84df996204
Reimplement the same hacky approach used in the old backend (see
cc2fe6b0c6).
Previously, the debugger incorrectly stepped into Collections.kt on
"step over" inline function calls from stdlib like 'any'.
Since `if` and `when` expressions are represented the same way in IR,
the behavior is fixed for both of them. It's not the case in the old JVM
backend, where stepping over `when` conditions still suffers from the
same problem, which the newly added test checks.
18 lines
300 B
Kotlin
Vendored
18 lines
300 B
Kotlin
Vendored
//FILE: test.kt
|
|
|
|
|
|
fun box() {
|
|
if (listOf(1, 2, 3).myAny { it > 2 }) {
|
|
println("foo")
|
|
}
|
|
}
|
|
|
|
public inline fun <T> Iterable<T>.myAny(predicate: (T) -> Boolean): Boolean {
|
|
for (element in this) {
|
|
if (predicate(element)) return true
|
|
}
|
|
return false
|
|
}
|
|
|
|
// 3 LINENUMBER 5
|