Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/loops/nestedLoopsShort.fir.kt
T
2020-02-03 16:45:20 +03:00

15 lines
311 B
Kotlin
Vendored

fun x(): Boolean { return true }
public fun foo(p: String?, r: String?, q: String?): Int {
while(true) {
q!!.length
do {
p!!.length
} while (r == null)
if (!x()) break
}
// Smart cast is possible everywhere
r.length
q.length
return p.length
}