Files
kotlin/compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLambda.kt
Mikhail Glukhikh fe13f39de9 Use of uninitialized variables in lambdas / object literals / local functions is forbidden now #KT-4475 Fixed
Local declarations CFA: variable initialization information before them is now taken into account
2015-11-17 18:21:09 +03:00

9 lines
122 B
Kotlin
Vendored

fun foo() {
var x: Int
fun bar() {
x = 42
}
<!UNINITIALIZED_VARIABLE!>x<!>.hashCode()
bar()
}