fix for for KT-259

This commit is contained in:
Alex Tkachman
2011-08-31 23:15:00 +02:00
parent ec31f991c0
commit 9e9959f953
3 changed files with 26 additions and 1 deletions
@@ -0,0 +1,20 @@
class A() {}
class B<T>() {}
fun box() : String {
val a = A()
System.out?.println(a is A) //true
System.out?.println(a is A?) //true
val b = B<String>()
System.out?.println(b is B<String>) //true
System.out?.println(b is B<String>?) //false !!!
val v = b as B<String> //ok
val u = b as B<String>? //TypeCastException
val w : B<String>? = b as B<String> //ok
val x = w as B<String>? //TypeCastException
return "OK"
}