mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 00:21:32 +00:00
JVM: move synthetic line number generation to the inliner
This makes the behavior of JVM and JVM_IR the same without having to deal with PSI nodes.
This commit is contained in:
11
compiler/testData/codegen/bytecodeText/lineNumbers/stdlibInlineOnlyOneLine.kt
vendored
Normal file
11
compiler/testData/codegen/bytecodeText/lineNumbers/stdlibInlineOnlyOneLine.kt
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
@kotlin.internal.InlineOnly
|
||||
inline fun <T, R> T.myLet(block: (T) -> R) = block(this)
|
||||
|
||||
fun box(): String {
|
||||
val k = "".myLet { it + "K" }
|
||||
return "O".myLet(fun (it: String): String { return it + k })
|
||||
}
|
||||
|
||||
// See KT-23064 for the problem and InlineOnlySmapSkipper for an explanation.
|
||||
// 2 LINENUMBER 65100
|
||||
Reference in New Issue
Block a user