Files
kotlin-fork/compiler/testData/debug/stepping/classObject.kt
T
Mads Ager c3b5b21845 [JVM] Extend stepping tests with <clinit> stepping.
In addition, made the stepping information for constructor calls
consistent across JVM_IR and JVM. For JVM_IR that stepping behavior
is consistent for enum constructor calls in <clinit> for JVM it
is not.
2020-06-30 11:18:29 +02:00

53 lines
1.0 KiB
Kotlin
Vendored

// FILE: test.kt
class A {
companion object {
val prop0 = 1
val prop1 = 2
fun foo(): Int {
return prop0 + prop1
}
}
}
fun box() {
A.prop0
A.prop1
A.foo()
}
// The JVM version hits get getProp line numbers twice. That appears
// to be because the synthetic accessibility bridges (access$getProp0$cp)
// have line numbers (of the start of the surrounding class) in the JVM
// version and they do not have line numbers in the JVM_IR version.
// LINENUMBERS
// test.kt:14 box
// test.kt:5 <clinit>
// test.kt:6 <clinit>
// test.kt:5 getProp0
// LINENUMBERS JVM
// test.kt:5 getProp0
// LINENUMBERS
// test.kt:14 box
// test.kt:15 box
// test.kt:6 getProp1
// LINENUMBERS JVM
// test.kt:6 getProp1
// LINENUMBERS
// test.kt:15 box
// test.kt:16 box
// test.kt:8 foo
// test.kt:5 getProp0
// LINENUMBERS JVM
// test.kt:5 getProp0
// LINENUMBERS
// test.kt:8 foo
// test.kt:6 getProp1
// LINENUMBERS JVM
// test.kt:6 getProp1
// LINENUMBERS
// test.kt:8 foo
// test.kt:16 box
// test.kt:17 box