Files
kotlin/compiler/testData/diagnostics/tests/dataFlow/assignment/uninitializedValNullability.kt
2015-02-16 18:50:10 +03:00

15 lines
287 B
Kotlin

fun test(a: Any?, flag: Boolean, x: Any?) {
if (a == null) return
<!DEBUG_INFO_SMARTCAST!>a<!>.hashCode()
val b: Any?
if (flag) {
b = a
<!DEBUG_INFO_SMARTCAST!>b<!>.hashCode()
}
else {
b = x
b<!UNSAFE_CALL!>.<!>hashCode()
}
}