KT-418: test for case when safe call on non-null value returns null

1?.somethingReturnNull()

must still yield null
This commit is contained in:
Stepan Koltsov
2011-11-08 16:00:22 +04:00
parent 1f511db31c
commit f47f462dca
@@ -0,0 +1,6 @@
fun Int.gg() = null
fun ff() {
val a: Int = 1
val b: Int = <!TYPE_MISMATCH!>a<!UNNECESSARY_SAFE_CALL!>?.<!>gg()<!>
}