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
This commit is contained in:
Mikhail Glukhikh
2015-11-11 13:05:40 +03:00
parent 89791dc85c
commit fe13f39de9
26 changed files with 245 additions and 105 deletions
@@ -0,0 +1,8 @@
fun foo() {
var x: Int
fun bar() {
x = 42
}
<!UNINITIALIZED_VARIABLE!>x<!>.hashCode()
bar()
}