Complex augmented assignment test.
Fix string literal creation for empty string template.
This commit is contained in:
committed by
Dmitry Petrov
parent
64d7a97145
commit
c1583c4368
+1
-1
@@ -1,4 +1,4 @@
|
||||
IrFile /augmentedAssignmentArray.kt
|
||||
IrFile /arrayAugmentedAssignment1.kt
|
||||
IrFunction public fun foo(): kotlin.IntArray
|
||||
IrExpressionBody
|
||||
BLOCK type=<no-type> hasResult=false isDesugared=true
|
||||
@@ -0,0 +1,11 @@
|
||||
interface IA {
|
||||
operator fun get(index: String): Int
|
||||
}
|
||||
|
||||
interface IB {
|
||||
operator fun IA.set(index: String, value: Int)
|
||||
}
|
||||
|
||||
fun IB.test(a: IA) {
|
||||
a[""] += 42
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
IrFile /arrayAugmentedAssignment2.kt
|
||||
DUMMY IA
|
||||
DUMMY IB
|
||||
IrFunction public fun IB.test(/*0*/ a: IA): kotlin.Unit
|
||||
IrExpressionBody
|
||||
BLOCK type=<no-type> hasResult=false isDesugared=false
|
||||
VAR val tmp0_array: IA
|
||||
GET_VAR a type=IA
|
||||
VAR val tmp1_index0: kotlin.String
|
||||
LITERAL String type=kotlin.String value=''
|
||||
CALL .set type=kotlin.Unit operator=PLUSEQ
|
||||
$this: $RECEIVER of: test type=IB
|
||||
$receiver: GET_VAR tmp0_array type=IA
|
||||
index: GET_VAR tmp1_index0 type=kotlin.String
|
||||
value: CALL .plus type=kotlin.Int operator=PLUSEQ
|
||||
$this: CALL .get type=kotlin.Int operator=PLUSEQ
|
||||
$this: GET_VAR tmp0_array type=IA
|
||||
index: GET_VAR tmp1_index0 type=kotlin.String
|
||||
other: LITERAL Int type=kotlin.Int value='42'
|
||||
@@ -10,7 +10,7 @@ IrFile /smartCastsWithDestructuring.kt
|
||||
IrExpressionBody
|
||||
BLOCK type=<no-type> hasResult=false isDesugared=true
|
||||
RETURN type=<no-type>
|
||||
? IrStringConcatenationExpressionImpl type=kotlin.String
|
||||
LITERAL String type=kotlin.String value=''
|
||||
IrFunction public fun test(/*0*/ x: I1): kotlin.Unit
|
||||
IrExpressionBody
|
||||
BLOCK type=<no-type> hasResult=false isDesugared=false
|
||||
|
||||
Reference in New Issue
Block a user