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

12 lines
299 B
Kotlin
Vendored

public fun foo(p: String?, y: String?): Int {
do {
// After the check, smart cast should work
if (y == null) {
"null".toString()
break
}
<!DEBUG_INFO_SMARTCAST!>y<!>.length
p!!.length
} while (true)
return y?.length ?: -1
}