Files
kotlin-fork/idea/jvm-debugger/jvm-debugger-test/testData/stepping/stepOver/stepOverInlineFunWithRecursionCall.kt
T
Yan Zhulanow 8f29f8bc9d Debugger: Rewrite step over action (KT-14296)
The main goal is to make behavior similar to what happens in Java. For instance, now we always skip lambdas.
Also, we can reliably use '$i$f' and '$i$a' synthetic local variables. There is no need in complicated hacks any more.
2020-02-14 17:35:17 +09:00

21 lines
461 B
Kotlin
Vendored

package stepOverInlineFunWithRecursionCall
fun foo(v: Int): Int {
if (v == 2) {
//Breakpoint!
inlineCall { foo(1) } // 1, 2 (lambda)
}
return 2 // This line should be visited // 3
}
fun main(args: Array<String>) {
foo(2) // 4
}
inline fun inlineCall(l: () -> Unit) {
l()
}
// STEP_OVER: 5