Preserve origins when desugaring augmented array assignments

^KT-63827: Fixed
This commit is contained in:
vladislav.grechko
2023-12-20 17:15:40 +00:00
committed by Space Team
parent eb790732fd
commit 77d0d1073e
27 changed files with 259 additions and 161 deletions
@@ -27,7 +27,7 @@ FILE fqName:<root> fileName:/lambdaInCAO.kt
FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Any
BLOCK_BODY
BLOCK type=kotlin.Unit origin=null
BLOCK type=kotlin.Unit origin=PLUSEQ
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Any [val]
GET_VAR 'a: kotlin.Any declared in <root>.test2' type=kotlin.Any origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Function0<kotlin.Unit> [val]
@@ -36,11 +36,11 @@ FILE fqName:<root> fileName:/lambdaInCAO.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Unit declared in <root>.test2'
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
CALL 'public final fun set (index: kotlin.Function0<kotlin.Unit>, value: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
CALL 'public final fun set (index: kotlin.Function0<kotlin.Unit>, value: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'val tmp_0: kotlin.Any declared in <root>.test2' type=kotlin.Any origin=null
index: GET_VAR 'val tmp_1: kotlin.Function0<kotlin.Unit> declared in <root>.test2' type=kotlin.Function0<kotlin.Unit> origin=null
value: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun get (index: kotlin.Function0<kotlin.Unit>): kotlin.Int declared in <root>' type=kotlin.Int origin=null
value: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun get (index: kotlin.Function0<kotlin.Unit>): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
$receiver: GET_VAR 'val tmp_0: kotlin.Any declared in <root>.test2' type=kotlin.Any origin=null
index: GET_VAR 'val tmp_1: kotlin.Function0<kotlin.Unit> declared in <root>.test2' type=kotlin.Function0<kotlin.Unit> origin=null
other: CONST Int type=kotlin.Int value=42