store nullability information in TypeInfo

This commit is contained in:
Dmitry Jemerov
2011-06-30 17:46:52 +02:00
parent 01a08ecd04
commit 840f9ffef1
6 changed files with 44 additions and 17 deletions
@@ -0,0 +1,13 @@
class Box<T>(t: T) {
var value = t
}
fun box(): String {
val nullableBox = Box<String?>("")
val notnullBox = Box<String>("")
if (nullableBox is Box<String>) return "fail 1"
if (notnullBox is Box<String?>) return "fail 2"
if (nullableBox !is Box<String?>) return "fail 3"
if (notnullBox !is Box<String>) return "fail 4"
return "OK"
}