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

10 lines
207 B
Kotlin
Vendored

// FIR_IDENTICAL
fun bar(): Boolean { return true }
fun foo(s: String?): Int {
while (s==null) {
if (bar()) break
}
// Call is unsafe due to break
return s<!UNSAFE_CALL!>.<!>length
}