Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/loops/doWhileInConditionWithBreak.kt
T
2015-10-14 20:39:35 +03:00

9 lines
205 B
Kotlin
Vendored

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