Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/lambdaDeclaresAndModifiesInLoop.kt
T
Stanislav Erokhin 298a075381 Minor. removed functions which declared in Standard.kt from diagnostic testdata.
Removed declaration for functions: TODO, run, with, apply, let.
2016-01-25 19:13:31 +03:00

10 lines
220 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
fun foo(arg: Int?) {
run {
var x = arg
while (x != null) {
x = <!DEBUG_INFO_SMARTCAST!>x<!>.hashCode()
if (x == 0) x = null
}
}
}