Files
kotlin-fork/compiler/testData/codegen/boxInline/smap/inlineOnly/stdlibInlineOnly.kt
T
pyos 25e1fb8502 JVM: map synthetic line numbers through the SMAP
This is necessary so that IDEA does not ignore the line number.
2020-05-25 20:03:56 +02:00

24 lines
562 B
Kotlin
Vendored

// 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
// See KT-23064 for the problem, InlineOnlySmapSkipper for an explanation, and
// `stdlibInlineOnlyOneLine.kt` for the case where something should actually happen.