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

10 lines
215 B
Kotlin
Vendored

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