Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/loops/WhileTrueWithBreakInIfCondition.fir.kt
T
2021-01-29 16:55:26 +03:00

14 lines
272 B
Kotlin
Vendored

fun checkJump(x: Int?, y: Int?) {
while (true) {
if (x ?: break == 0) {
y!!
} else {
y!!
}
// Ok
y.hashCode()
}
// Smart cast here is erroneous: y is nullable
y<!UNSAFE_CALL!>.<!>hashCode()
}