Test for "Debugger: "Step over" dives into recursive call" (KT-12924)

Fixed in 7992df7b93

(cherry picked from commit 78e2f05)

 #KT-12924 Fixed
This commit is contained in:
Nikolay Krasko
2016-07-12 13:45:21 +03:00
committed by Nikolay Krasko
parent c21e1eb857
commit 8c2e61604e
3 changed files with 37 additions and 0 deletions
@@ -0,0 +1,10 @@
LineBreakpoint created at stepOverInlineFunWithRecursionCall.kt:6
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stepOverInlineFunWithRecursionCall.StepOverInlineFunWithRecursionCallKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
stepOverInlineFunWithRecursionCall.kt:6
stepOverInlineFunWithRecursionCall.kt:6
stepOverInlineFunWithRecursionCall.kt:9
stepOverInlineFunWithRecursionCall.kt:14
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,21 @@
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: 3