Fix safe calls codegen for nullable generic
This commit is contained in:
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user