FIR CFG: merge data flow if called-in-place lambda may not be called

This commit is contained in:
pyos
2022-06-30 11:26:32 +02:00
committed by Dmitriy Novozhilov
parent 06c7572ee5
commit 5a2ec4a0d5
23 changed files with 594 additions and 129 deletions
@@ -10,7 +10,7 @@ fun case_1(arg: Int?) {
// TESTCASE NUMBER: 2
fun case_2(arg: Int?) {
funWithAtLeastOnceCallsInPlace { arg!! }
arg<!UNSAFE_CALL!>.<!>inc()
arg.inc()
}
// TESTCASE NUMBER: 3
@@ -24,5 +24,5 @@ fun case_3() {
fun case_4() {
val value_1: Boolean?
funWithAtLeastOnceCallsInPlace { <!VAL_REASSIGNMENT!>value_1<!> = true }
value_1<!UNSAFE_CALL!>.<!>not()
value_1.not()
}