2c6b5c8847
Temporary variable loads in when expressions had the offsets of the variable declaration. That leads to hacks during codegen for line number generation. Instead of those hacks, give the variable loads the offsets of the context in which they occur. That avoids the codegen hacks and fixes stepping behavior for more when expressions.
38 lines
540 B
Kotlin
Vendored
38 lines
540 B
Kotlin
Vendored
// FILE: test.kt
|
|
|
|
fun foo(x: Any) {
|
|
when (x) {
|
|
is Float ->
|
|
1
|
|
is Double ->
|
|
2
|
|
else ->
|
|
3
|
|
}
|
|
}
|
|
|
|
fun box() {
|
|
foo(1.2f)
|
|
foo(1.2)
|
|
foo(1)
|
|
}
|
|
|
|
// LINENUMBERS
|
|
// test.kt:15 box
|
|
// test.kt:4 foo
|
|
// test.kt:5 foo
|
|
// test.kt:6 foo
|
|
// test.kt:12 foo
|
|
// test.kt:16 box
|
|
// test.kt:4 foo
|
|
// test.kt:5 foo
|
|
// test.kt:7 foo
|
|
// test.kt:8 foo
|
|
// test.kt:12 foo
|
|
// test.kt:17 box
|
|
// test.kt:4 foo
|
|
// test.kt:5 foo
|
|
// test.kt:7 foo
|
|
// test.kt:10 foo
|
|
// test.kt:12 foo
|
|
// test.kt:18 box |