Files
kotlin-fork/compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt
T
Alexander Udalov f7958edf21 Improve test data format for SMAP codegen tests
Instead of comments in a Kotlin source file, add a .smap with the contents of
the source mapping data (and possible comments)
2016-02-27 15:40:06 +03:00

73 lines
620 B
Kotlin
Vendored

// FILE: 1.kt
package builders
inline fun call(crossinline init: () -> Unit) {
return {
init()
}()
}
// FILE: 2.kt
import builders.*
//NO_CHECK_LAMBDA_INLINING
fun test(): String {
var res = "Fail"
call {
res = "OK"
}
return res
}
fun box(): String {
return test()
}
// FILE: 1.smap
SMAP
1.kt
Kotlin
*S Kotlin
*F
+ 1 1.kt
builders/_1Kt$call$1
*L
1#1,11:1
*E
// FILE: 2.smap
SMAP
2.kt
Kotlin
*S Kotlin
*F
+ 1 2.kt
_2Kt
+ 2 1.kt
builders/_1Kt
*L
1#1,21:1
6#2:22
*E
SMAP
1.kt
Kotlin
*S Kotlin
*F
+ 1 1.kt
builders/_1Kt$call$1
+ 2 2.kt
_2Kt
*L
1#1,11:1
10#2,2:12
*E