[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
@@ -1,6 +1,9 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -DEBUG_INFO_SMARTCAST
fun getArray(): Array<Int> = throw Exception()
fun getList(): MutableList<Int> = throw Exception()
fun getNullableList(): MutableList<Int>? = throw Exception()
fun fn() {
getArray()[1] = 2
getList()[1] = 2
@@ -8,4 +11,9 @@ fun fn() {
getList()[1]++
getArray()[1] += 2
getList()[1] += 2
val nullable = getNullableList()
if (nullable != null) {
nullable[1] += 1
}
}