add local variable test. This test runs box() method and checks local variable types and names avaiable at every step.

This commit is contained in:
Jiaxiang Chen
2019-10-21 17:29:04 -07:00
committed by Ilmir Usmanov
parent 6b73ef4b0b
commit 6454cfad87
11 changed files with 355 additions and 4 deletions
@@ -0,0 +1,20 @@
//FILE: test.kt
data class A(val x: String, val y: Int)
fun foo(a: A, block: (A) -> String): String = block(a)
fun box() {
foo(A("O", 123)) { (x, y) -> x + y }
}
// IGNORE_BACKEND: JVM_IR
// LOCAL VARIABLES
// TestKt:8:
// A:3: x:java.lang.String, y:int
// TestKt:8:
// TestKt:5: $dstr$x$y:A
// TestKt$box$1:8:
// TestKt$box$1.invoke(java.lang.Object)+8: a:A, block:TestKt$box$1
// TestKt:5: a:A, block:TestKt$box$1
// TestKt:8:
// TestKt:9: