JVM: preserve call site markers when inlining lambdas

and default functions into their own stubs.

Fixes #KT-35006
This commit is contained in:
pyos
2020-03-25 16:41:47 +01:00
committed by max-kammerer
parent 9d21800d8f
commit e98bdc6f8e
18 changed files with 250 additions and 81 deletions
@@ -0,0 +1,63 @@
// FILE: 1.kt
// IGNORE_BACKEND_MULTI_MODULE: JVM_IR
package test
inline fun inlineFun2(param: String): String {
return param
}
inline fun inlineFun(param: String = "OK"): String {
// The Kotlin stratum should only contain 1 out-of-range line, and
// KotlinDebug should point it to this line:
return inlineFun2(param)
}
// FILE: 2.kt
import test.*
fun box(): String {
return inlineFun()
}
// FILE: 1.smap
SMAP
1.kt
Kotlin
*S Kotlin
*F
+ 1 1.kt
test/_1Kt
*L
1#1,14:1
5#1:15
*E
*S KotlinDebug
*F
+ 1 1.kt
test/_1Kt
*L
11#1:15
*E
// FILE: 2.smap
SMAP
2.kt
Kotlin
*S Kotlin
*F
+ 1 2.kt
_2Kt
+ 2 1.kt
test/_1Kt
*L
1#1,8:1
8#2,4:9
5#2:13
*E
*S KotlinDebug
*F
+ 1 2.kt
_2Kt
*L
5#1,4:9
5#1:13
*E