Skip to content

Instantly share code, notes, and snippets.

@shahsurajk
Created March 23, 2020 07:50
Show Gist options
  • Save shahsurajk/619e041b10db9863c39d98cc9c83a212 to your computer and use it in GitHub Desktop.
Save shahsurajk/619e041b10db9863c39d98cc9c83a212 to your computer and use it in GitHub Desktop.
val list: List<Any> = arrayListOf<String>()
if (list is List<String>)
// this will throw a compile time error saying
// Cannot check for instance of erased type: List<String>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment