Debugger: stop at closing bracket for functions without return statement
This commit is contained in:
@@ -1697,6 +1697,8 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> implem
|
|||||||
// If it does not end with return we should return something
|
// If it does not end with return we should return something
|
||||||
// because if we don't there can be VerifyError (specific cases with Nothing-typed expressions)
|
// because if we don't there can be VerifyError (specific cases with Nothing-typed expressions)
|
||||||
if (!endsWithReturn(expr)) {
|
if (!endsWithReturn(expr)) {
|
||||||
|
markLineNumber(expr, true);
|
||||||
|
|
||||||
if (isBlockedNamedFunction && !Type.VOID_TYPE.equals(expressionType(expr))) {
|
if (isBlockedNamedFunction && !Type.VOID_TYPE.equals(expressionType(expr))) {
|
||||||
StackValue.none().put(returnType, v);
|
StackValue.none().put(returnType, v);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
LineBreakpoint created at returnVoid.kt:5
|
||||||
|
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !APP_PATH!\classes;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! returnVoid.ReturnVoidPackage
|
||||||
|
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
|
returnVoid.kt:5
|
||||||
|
returnVoid.kt:6
|
||||||
|
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
|
|
||||||
|
Process finished with exit code 0
|
||||||
@@ -2,7 +2,7 @@ LineBreakpoint created at skipClassloader.kt:7
|
|||||||
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !APP_PATH!\classes;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! skipClassloader.SkipClassloaderPackage
|
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !APP_PATH!\classes;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! skipClassloader.SkipClassloaderPackage
|
||||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
skipClassloader.kt:7
|
skipClassloader.kt:7
|
||||||
skipClassloader.kt:11
|
skipClassloader.kt:13
|
||||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
|
|
||||||
Process finished with exit code 0
|
Process finished with exit code 0
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ LineBreakpoint created at syntheticMethods.kt:6
|
|||||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
syntheticMethods.kt:6
|
syntheticMethods.kt:6
|
||||||
syntheticMethods.kt:18
|
syntheticMethods.kt:18
|
||||||
|
syntheticMethods.kt:19
|
||||||
syntheticMethods.kt:16
|
syntheticMethods.kt:16
|
||||||
syntheticMethods.kt:7
|
syntheticMethods.kt:7
|
||||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package returnVoid
|
||||||
|
|
||||||
|
fun main(args: Array<String>) {
|
||||||
|
//Breakpoint!
|
||||||
|
val a = 3
|
||||||
|
}
|
||||||
|
|
||||||
|
// STEP_INTO: 1
|
||||||
@@ -19,4 +19,4 @@ class Derived: Base<String>() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// STEP_INTO: 3
|
// STEP_INTO: 4
|
||||||
@@ -225,6 +225,12 @@ public class KotlinSteppingTestGenerated extends AbstractKotlinSteppingTest {
|
|||||||
doStepIntoTest(fileName);
|
doStepIntoTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("returnVoid.kt")
|
||||||
|
public void testReturnVoid() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepInto/stepInto/returnVoid.kt");
|
||||||
|
doStepIntoTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("syntheticMethods.kt")
|
@TestMetadata("syntheticMethods.kt")
|
||||||
public void testSyntheticMethods() throws Exception {
|
public void testSyntheticMethods() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepInto/stepInto/syntheticMethods.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepInto/stepInto/syntheticMethods.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user