mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
If a part of an 'if' condition is an inline function call, we need to insert the original condition line after it. Otherwise, the debugger will think it is inside the inline function implementation. Obviously, this breaks stepping – instead of the 'if' body, we go on stepping through the inline function. This commit fixes 'KotlinSteppingTestGenerated.StepOver#testSoInlineLibFun' test.
17 lines
324 B
Kotlin
Vendored
17 lines
324 B
Kotlin
Vendored
//FILE: test.kt
|
|
// IGNORE_BACKEND: JVM_IR
|
|
|
|
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 |