[IR] More extensive LVT tests around destructuring

All tests in this commit _pass_ to document existing behavior, but
this will change in a separate commit as we reflect desired behavior
in the test expectations.
This commit is contained in:
Kristoffer Andersen
2022-03-01 12:37:14 +01:00
committed by Alexander Udalov
parent 9b44c73f54
commit b81139ad36
19 changed files with 843 additions and 62 deletions
+32
View File
@@ -0,0 +1,32 @@
// FILE: test.kt
fun box(): String {
val
o
=
"O"
val k = "K"
return o + k
}
// A location for the expression being evaluated, and one for the store to the LV, but:
// JVM: location for evaluating expression, location for the assigned variable
// JVM_IR: location for evaluating expression, location for the val keyword
// EXPECTATIONS
// EXPECTATIONS JVM
// test.kt:8 box:
// test.kt:6 box:
// test.kt:11 box: o:java.lang.String="O":java.lang.String
// test.kt:13 box: o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
// EXPECTATIONS JVM_IR
// test.kt:8 box:
// test.kt:5 box:
// test.kt:11 box: o:java.lang.String="O":java.lang.String
// test.kt:13 box: o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String