FIR checker: report val reassignment
This commit is contained in:
committed by
Dmitriy Novozhilov
parent
b128577508
commit
f1fa290d49
+2
-2
@@ -19,7 +19,7 @@ fun myRun(block: () -> Unit) {
|
||||
fun test_1() {
|
||||
val x: Int
|
||||
inlineRun {
|
||||
x = 1
|
||||
<!VAL_REASSIGNMENT!>x<!> = 1
|
||||
}
|
||||
x.inc()
|
||||
}
|
||||
@@ -27,7 +27,7 @@ fun test_1() {
|
||||
fun test_2() {
|
||||
val x: Int
|
||||
myRun {
|
||||
x = 1
|
||||
<!VAL_REASSIGNMENT!>x<!> = 1
|
||||
}
|
||||
x.inc()
|
||||
}
|
||||
+2
-2
@@ -19,7 +19,7 @@ fun myRun(block: () -> Unit) {
|
||||
fun test_1() {
|
||||
val x: Int
|
||||
inlineRun {
|
||||
x = 1
|
||||
<!VAL_REASSIGNMENT!>x<!> = 1
|
||||
}
|
||||
<!UNINITIALIZED_VARIABLE!>x<!>.inc()
|
||||
}
|
||||
@@ -27,7 +27,7 @@ fun test_1() {
|
||||
fun test_2() {
|
||||
val x: Int
|
||||
myRun {
|
||||
x = 1
|
||||
<!VAL_REASSIGNMENT!>x<!> = 1
|
||||
}
|
||||
<!UNINITIALIZED_VARIABLE!>x<!>.inc()
|
||||
}
|
||||
Reference in New Issue
Block a user