JVM IR: fix "step over" for inline function calls in conditions

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.
This commit is contained in:
Alexander Udalov
2020-09-15 16:25:12 +02:00
parent 4144adf4ee
commit 84df996204
16 changed files with 238 additions and 12 deletions
@@ -1,5 +1,5 @@
//FILE: test.kt
// IGNORE_BACKEND: JVM_IR
fun box() {
if (listOf(1, 2, 3).myAny { it > 2 }) {
@@ -14,4 +14,4 @@ public inline fun <T> Iterable<T>.myAny(predicate: (T) -> Boolean): Boolean {
return false
}
// 3 LINENUMBER 5
// 3 LINENUMBER 5