Files
kotlin-fork/js/js.translator/testData/lineNumbers/charBoxing.kt
T
Alexey Andreev ca63717124 Multiple fixes of JS source maps
- elvis expression with complex RHS
- destructuring declarations
- decomposition of `var` statement (for example, in case of
  inline destructuring functions)
- `is` LHS &&/|| inline fun RHS
- argument assignment to temporary var on inline call site
- assignment of `next()` result to temporary var in `for` expression
- rethrow statement in exception handler
2017-07-06 10:20:49 +03:00

20 lines
390 B
Kotlin
Vendored

var log = ""
inline fun String.foo(a: String): Int {
log += "foo1"
return asDynamic().indexOf(a)
}
inline fun String.foo(a: Char): Int {
log += "foo2"
return indexOf(a.toString())
}
fun bar(a: String, b: Char, x: Int) {
log += if (x > 0)
23
else
a.foo(b)
}
// LINES: 6 4 4 5 5 11 9 9 10 10 18 14 14 14 14 14 15 17 17 9 9 14 10 17 10 14 14 * 1 * 1