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

10 lines
225 B
Kotlin
Vendored

fun x(): Boolean { return true }
public fun foo(p: String?): Int {
// See KT-6283
do {
if (p != null) break
} while (!x())
// p can be null despite of the break
return p<!UNSAFE_CALL!>.<!>length
}