Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/loops/WhileTrueWithBreakInIfCondition.fir.kt
T

14 lines
283 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.<!INAPPLICABLE_CANDIDATE!>hashCode<!>()
}