Files
kotlin-fork/js/js.translator/testData/lineNumbers/inliningWithLambda.kt
T
Alexey Andreev e5662ac2ad Copy location info when copying JS AST subtrees
This is necessary to preserve source information of a function's body
after inlining.
2017-05-30 12:12:28 +03:00

19 lines
267 B
Kotlin
Vendored

fun box() {
println("1")
foo {
println("x")
}
println("2")
foo {
println("y")
}
println("3")
}
inline fun foo(f: () -> Unit) {
println("before")
f()
println("after")
}
// LINES: 2 14 4 16 6 14 8 16 10 14 15 16