Files
kotlin-fork/js/js.translator/testData/lineNumbers/lastExpressionInInlineLambda.kt
T
Roman Artemev 46b98a1e98 [JS BE] Make sourceMap generation more precise
- Don't produce mapping for closing bracket in case of expressionBody
 - Map Kt*Function declaration into corresponding js fun declaration
 - Update test data & add new test
2019-07-24 18:56:40 +03:00

27 lines
426 B
Kotlin
Vendored

fun foo() {
bar {
try {
baz()
}
catch (e: RuntimeException) {
e.toString()
}
}
bar {
when (boo()) {
"boo" -> baz()
else -> "111"
}
}
}
inline fun bar(x: () -> String): String {
return x()
}
fun baz() = "baz"
fun boo() = "boo"
// LINES: 1 17 9 4 6 6 7 7 3 3 3 * 13 12 13 13 14 19 21 20 20 23 23 23 25 25 25