FIR checker: report val reassignment

This commit is contained in:
Jinseong Jeon
2021-02-19 00:51:16 -08:00
committed by Dmitriy Novozhilov
parent b128577508
commit f1fa290d49
66 changed files with 386 additions and 309 deletions
@@ -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()
}
@@ -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()
}