JVM: do not write trivial SMAPs to classes outside inline funs
where trivial == those that map the file to itself.
This commit is contained in:
@@ -13,14 +13,3 @@ fun box(): String {
|
||||
}
|
||||
|
||||
// FILE: 2.smap
|
||||
|
||||
SMAP
|
||||
2.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt
|
||||
*L
|
||||
1#1,7:1
|
||||
*E
|
||||
|
||||
@@ -18,14 +18,3 @@ fun box(): String {
|
||||
}
|
||||
|
||||
// FILE: 2.smap
|
||||
|
||||
SMAP
|
||||
2.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt
|
||||
*L
|
||||
1#1,8:1
|
||||
*E
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
@kotlin.internal.InlineOnly
|
||||
inline fun <T, R> T.myLet(block: (T) -> R) = block(this)
|
||||
|
||||
// FILE: 2.kt
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
// should not have any line numbers
|
||||
val k = "".myLet {
|
||||
it + "K"
|
||||
}
|
||||
return "O".myLet(fun (it: String): String {
|
||||
return it + k
|
||||
})
|
||||
}
|
||||
|
||||
// FILE: 2.smap
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
@kotlin.internal.InlineOnly
|
||||
inline fun <T, R> T.myLet(block: (T) -> R) = block(this)
|
||||
|
||||
// FILE: 2.kt
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
val k = "".myLet { it + "K" }
|
||||
return "O".myLet(fun (it: String): String { return it + k })
|
||||
}
|
||||
|
||||
// FILE: 2.smap
|
||||
Reference in New Issue
Block a user