Skip to content

Instantly share code, notes, and snippets.

@channyeintun
Created May 12, 2021 07:02
Show Gist options
  • Select an option

  • Save channyeintun/58dd9957e075b8ad5d5916f15fc4737e to your computer and use it in GitHub Desktop.

Select an option

Save channyeintun/58dd9957e075b8ad5d5916f15fc4737e to your computer and use it in GitHub Desktop.
package main
open class Pet
class Dog:Pet()
inline fun <reified T>check(t:Any)=t is T
fun main(){
var isValid:Boolean=check<Pet>(Dog())
println(isValid)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment