'is' works for type parameters

This commit is contained in:
Dmitry Jemerov
2011-05-13 18:42:05 +02:00
parent 82dabdc8d5
commit 6770f309ac
5 changed files with 56 additions and 13 deletions
@@ -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>())
}