[JVM_IR] Fix stepping behavior for assignments to local variables.

This commit is contained in:
Mads Ager
2020-05-28 15:05:18 +02:00
committed by max-kammerer
parent 543efffa5c
commit 1124887aa0
11 changed files with 116 additions and 25 deletions
@@ -0,0 +1,29 @@
// FILE: test.kt
fun box() {
var x: String
var y: Int
var z: Boolean
z = false
y = 42
if (!z) {
x = y.toString()
}
}
// The JVM IR backend does not generate line number information for the
// declaration of local variables without initializer. Stepping through
// those does not seem useful. This is consistent with javac behavior
// as well. The JVM backend does generate these line numbers.
// LINENUMBERS
// LINENUMBERS JVM
// test.kt:4 box
// test.kt:5 box
// test.kt:6 box
// LINENUMBERS
// test.kt:7 box
// test.kt:8 box
// test.kt:9 box
// test.kt:10 box
// test.kt:12 box