FIR checker: report val reassignment
This commit is contained in:
committed by
Dmitriy Novozhilov
parent
b128577508
commit
f1fa290d49
+1
-1
@@ -86,7 +86,7 @@ fun testRepeatOnVal(x: Int) {
|
||||
val y: Int
|
||||
repeat(x) {
|
||||
// reassignment instead of captured val initialization
|
||||
y = 42
|
||||
<!VAL_REASSIGNMENT!>y<!> = 42
|
||||
}
|
||||
println(<!UNINITIALIZED_VARIABLE!>y<!>)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user