[FIR] Fix augmented array set call on smartcasted receiver

#KT-60917 Fixed
This commit is contained in:
Kirill Rakhman
2023-08-16 16:45:10 +02:00
committed by Space Team
parent 72957b9978
commit 640d1e3fc8
6 changed files with 20 additions and 8 deletions
@@ -15,7 +15,7 @@
// TESTCASE NUMBER: 1
fun case_1(x: Class?) {
x!!
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & Class")!>x<!>[if (true) {<!VAL_REASSIGNMENT!>x<!>=null;0} else 0] <!UNRESOLVED_REFERENCE!>+=<!> <!DEBUG_INFO_EXPRESSION_TYPE("Class? & Class")!>x<!>[0]
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & Class"), DEBUG_INFO_EXPRESSION_TYPE("Class"), DEBUG_INFO_EXPRESSION_TYPE("Class")!>x<!>[if (true) {<!VAL_REASSIGNMENT!>x<!>=null;0} else 0] += <!DEBUG_INFO_EXPRESSION_TYPE("Class? & Class")!>x<!>[0]
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & Class")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("Class? & Class")!>x<!>[0].inv()
}
@@ -18,7 +18,7 @@
fun case_1() {
var x: MutableList<Int>? = mutableListOf(1)
x!!
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableList<kotlin.Int>? & kotlin.collections.MutableList<kotlin.Int>")!>x<!>[if (true) {x=null;0} else 0] <!UNRESOLVED_REFERENCE!>+=<!> <!UNSAFE_CALL!><!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableList<kotlin.Int>?")!>x<!>[0]<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableList<kotlin.Int>? & kotlin.collections.MutableList<kotlin.Int>"), DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableList<kotlin.Int>"), DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableList<kotlin.Int>")!>x<!>[if (true) {x=null;0} else 0] += <!UNSAFE_CALL!><!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableList<kotlin.Int>?")!>x<!>[0]<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableList<kotlin.Int>?")!>x<!>
<!UNSAFE_CALL!><!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableList<kotlin.Int>?")!>x<!>[0]<!>.inv()
}