diff --git a/idea/testData/debugger/tinyApp/outs/stepOverInlineFunWithRecursionCall.out b/idea/testData/debugger/tinyApp/outs/stepOverInlineFunWithRecursionCall.out new file mode 100644 index 00000000000..d4118feb99e --- /dev/null +++ b/idea/testData/debugger/tinyApp/outs/stepOverInlineFunWithRecursionCall.out @@ -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 diff --git a/idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverInlineFunWithRecursionCall.kt b/idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverInlineFunWithRecursionCall.kt new file mode 100644 index 00000000000..b913fa68a3f --- /dev/null +++ b/idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverInlineFunWithRecursionCall.kt @@ -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) { + foo(2) // 4 +} + +inline fun inlineCall(l: () -> Unit) { + l() +} + +// STEP_OVER: 3 \ No newline at end of file diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinSteppingTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinSteppingTestGenerated.java index f9c485df8e2..d1f32c8b32b 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinSteppingTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinSteppingTestGenerated.java @@ -589,6 +589,12 @@ public class KotlinSteppingTestGenerated extends AbstractKotlinSteppingTest { doStepOverTest(fileName); } + @TestMetadata("stepOverInlineFunWithRecursionCall.kt") + public void testStepOverInlineFunWithRecursionCall() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverInlineFunWithRecursionCall.kt"); + doStepOverTest(fileName); + } + @TestMetadata("stepOverInlineFunctionInReturn.kt") public void testStepOverInlineFunctionInReturn() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverInlineFunctionInReturn.kt");