Created
May 12, 2021 07:02
-
-
Save channyeintun/58dd9957e075b8ad5d5916f15fc4737e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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