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
@@ -23,6 +23,6 @@ fun case_3() {
// TESTCASE NUMBER: 4
fun case_4() {
val value_1: Boolean?
funWithUnknownCallsInPlace { value_1 = true }
funWithUnknownCallsInPlace { <!VAL_REASSIGNMENT!>value_1<!> = true }
<!UNINITIALIZED_VARIABLE!>value_1<!><!UNSAFE_CALL!>.<!>not()
}
@@ -23,6 +23,6 @@ fun case_3() {
// TESTCASE NUMBER: 4
fun case_4() {
val value_1: Boolean?
funWithAtLeastOnceCallsInPlace { value_1 = true }
funWithAtLeastOnceCallsInPlace { <!VAL_REASSIGNMENT!>value_1<!> = true }
value_1<!UNSAFE_CALL!>.<!>not()
}