K2: do not generate line numbers for delegated members
Psi2ir does not generate them, see https://github.com/JetBrains/kotlin/blob/1.8.20/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ClassGenerator.kt#L319. Besides influencing debugger and coverage behavior, it also affects how conflicting JVM signature diagnostics are reported because they use offsets to determine which element to report the error on. So after this change, K1 and K2 behavior is the same in that regard as well. #KT-58215 Fixed
This commit is contained in:
committed by
Space Team
parent
b3aa2dd60f
commit
987e8c25dc
+41
@@ -0,0 +1,41 @@
|
||||
// FILE: test.kt
|
||||
|
||||
interface I {
|
||||
fun f()
|
||||
}
|
||||
|
||||
object O : I {
|
||||
override fun f() {
|
||||
Unit
|
||||
}
|
||||
}
|
||||
|
||||
class C : I by O
|
||||
|
||||
fun box() {
|
||||
val c = C()
|
||||
c.f()
|
||||
}
|
||||
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:16 box
|
||||
// test.kt:13 <init>
|
||||
// EXPECTATIONS JVM
|
||||
// test.kt:7 <clinit>
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:16 box
|
||||
// test.kt:17 box
|
||||
// test.kt:10 f
|
||||
// test.kt:-1 f
|
||||
// test.kt:18 box
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:16 box
|
||||
// test.kt:13 <init>
|
||||
// test.kt:7 <init>
|
||||
// test.kt:13 <init>
|
||||
// test.kt:17 box
|
||||
// test.kt:1 f
|
||||
// test.kt:10 f
|
||||
// test.kt:1 f
|
||||
// test.kt:18 box
|
||||
Reference in New Issue
Block a user