Files
kotlin-fork/compiler/testData/debug/stepping/whenSubject.kt
T
Mads Ager 7d7b9262e7 [JVM] Port remaining line number tests to stepping infrastructure.
These line number tests only tested that a set of line numbers where
present in the java bytecode. Not that they would be hit in the
right order by the debugger. Moving them to stepping tests fixes that.

This exposes a couple of issues (in particular around try-catch-finally)
that should be fixed.

A number of tests are marked as failing now. Will investigate and
work on fixes next.
2020-05-29 15:07:49 +02:00

94 lines
1.5 KiB
Kotlin
Vendored

// FILE: test.kt
fun foo(x: Int) {
when (x) {
21 -> foo(42)
42 -> foo(63)
else -> 1
}
val t = when (x) {
21 -> foo(42)
42 -> foo(63)
else -> 1
}
}
fun box() {
foo(21)
}
// JVM_IR stops on line 8 when exiting the first when.
// LINENUMBERS
// test.kt:18 box
// test.kt:4 foo
// test.kt:5 foo
// test.kt:4 foo
// test.kt:6 foo
// test.kt:4 foo
// test.kt:7 foo
// LINENUMBERS JVM_IR
// test.kt:8 foo
// LINENUMBERS
// test.kt:10 foo
// test.kt:13 foo
// test.kt:10 foo
// test.kt:15 foo
// test.kt:6 foo
// LINENUMBERS JVM_IR
// test.kt:8 foo
// LINENUMBERS
// test.kt:10 foo
// test.kt:12 foo
// test.kt:4 foo
// test.kt:7 foo
// LINENUMBERS JVM_IR
// test.kt:8 foo
// LINENUMBERS
// test.kt:10 foo
// test.kt:13 foo
// test.kt:10 foo
// test.kt:15 foo
// test.kt:12 foo
// test.kt:10 foo
// test.kt:15 foo
// test.kt:5 foo
// LINENUMBERS JVM_IR
// test.kt:8 foo
// LINENUMBERS
// test.kt:10 foo
// test.kt:11 foo
// test.kt:4 foo
// test.kt:6 foo
// test.kt:4 foo
// test.kt:7 foo
// LINENUMBERS JVM_IR
// test.kt:8 foo
// LINENUMBERS
// test.kt:10 foo
// test.kt:13 foo
// test.kt:10 foo
// test.kt:15 foo
// test.kt:6 foo
// LINENUMBERS JVM_IR
// test.kt:8 foo
// LINENUMBERS
// test.kt:10 foo
// test.kt:12 foo
// test.kt:4 foo
// test.kt:7 foo
// LINENUMBERS JVM_IR
// test.kt:8 foo
// LINENUMBERS
// test.kt:10 foo
// test.kt:13 foo
// test.kt:10 foo
// test.kt:15 foo
// test.kt:12 foo
// test.kt:10 foo
// test.kt:15 foo
// test.kt:11 foo
// test.kt:10 foo
// test.kt:15 foo
// test.kt:19 box