ca63717124
- 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
20 lines
390 B
Kotlin
Vendored
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 |