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:
Vendored
+2
-2
@@ -271,7 +271,7 @@ fun foo() {
|
||||
z = 3
|
||||
}
|
||||
fun foo() {
|
||||
<!VAL_REASSIGNMENT!>y<!> = 10
|
||||
y = 10
|
||||
<!VAL_REASSIGNMENT!>z<!> = 13
|
||||
}
|
||||
}
|
||||
@@ -290,7 +290,7 @@ class TestObjectExpression() {
|
||||
x = 1
|
||||
}
|
||||
fun inner1() {
|
||||
<!VAL_REASSIGNMENT!>y<!> = 101
|
||||
y = 101
|
||||
<!VAL_REASSIGNMENT!>a<!> = 231
|
||||
}
|
||||
fun inner2() {
|
||||
|
||||
Reference in New Issue
Block a user