'is' works for type parameters
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
class Wrapper<T>() {
|
||||
fun isSameWrapper(wrapper: Any) = wrapper is Wrapper<T>
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
val wrapper = new Wrapper<Int>()
|
||||
return wrapper.isSameWrapper(new Wrapper<String>())
|
||||
}
|
||||
Reference in New Issue
Block a user