Fix safe calls codegen for nullable generic

This commit is contained in:
Alexander Udalov
2013-02-06 17:53:31 +04:00
parent 433660b2ce
commit 64bc79aaac
4 changed files with 28 additions and 4 deletions
@@ -0,0 +1,8 @@
fun foo<T : Number?>(t: T) {
t?.toInt()
}
fun box(): String {
foo<Int?>(null)
return "OK"
}
@@ -0,0 +1,8 @@
fun Int.foo() = 239
fun Long.bar() = 239.toLong()
fun box(): String {
42?.foo()
42.toLong()?.bar()
return "OK"
}