Fix codegen of !! for nullable generics

This commit is contained in:
Alexander Udalov
2013-02-06 17:20:47 +04:00
parent 75f09b7527
commit 433660b2ce
4 changed files with 46 additions and 14 deletions
@@ -0,0 +1,12 @@
fun foo<T>(t: T) {
t!!
}
fun box(): String {
try {
foo<Any?>(null)
} catch (e: Exception) {
return "OK"
}
return "Fail"
}
@@ -0,0 +1,5 @@
fun box(): String {
42!!
42.toLong()!!
return "OK"!!
}