Debugger: suppress UNSAFE_CALL diagnostic in debug mode
This commit is contained in:
@@ -31,7 +31,8 @@ public class DiagnosticSuppressorForDebugger : DiagnosticsWithSuppression.Diagno
|
|||||||
val diagnosticFactory = diagnostic.getFactory()
|
val diagnosticFactory = diagnostic.getFactory()
|
||||||
return diagnosticFactory == Errors.INVISIBLE_MEMBER ||
|
return diagnosticFactory == Errors.INVISIBLE_MEMBER ||
|
||||||
diagnosticFactory == Errors.INVISIBLE_REFERENCE ||
|
diagnosticFactory == Errors.INVISIBLE_REFERENCE ||
|
||||||
diagnosticFactory == Errors.INVISIBLE_SETTER
|
diagnosticFactory == Errors.INVISIBLE_SETTER ||
|
||||||
|
diagnosticFactory == Errors.UNSAFE_CALL
|
||||||
}
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
LineBreakpoint created at unsafeCall.kt:8
|
||||||
|
!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! unsafeCall.UnsafeCallPackage
|
||||||
|
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
|
unsafeCall.kt:8
|
||||||
|
Compile bytecode for s1.length()
|
||||||
|
Compile bytecode for s2.length()
|
||||||
|
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
|
|
||||||
|
Process finished with exit code 0
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package unsafeCall
|
||||||
|
|
||||||
|
// this test is used also to check more than one file for package in JetPositionManager:prepareTypeMapper. see forTests/simple.kt
|
||||||
|
fun main(args: Array<String>) {
|
||||||
|
val s1: String? = "a"
|
||||||
|
val s2: String? = null
|
||||||
|
//Breakpoint!
|
||||||
|
args.size
|
||||||
|
}
|
||||||
|
|
||||||
|
// EXPRESSION: s1.length()
|
||||||
|
// RESULT: 1: I
|
||||||
|
|
||||||
|
// EXPRESSION: s2.length()
|
||||||
|
// RESULT: java.lang.NullPointerException: Ljava/lang/NullPointerException;
|
||||||
+6
@@ -208,6 +208,12 @@ public class KotlinEvaluateExpressionTestGenerated extends AbstractKotlinEvaluat
|
|||||||
doSingleBreakpointTest(fileName);
|
doSingleBreakpointTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("unsafeCall.kt")
|
||||||
|
public void testUnsafeCall() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/unsafeCall.kt");
|
||||||
|
doSingleBreakpointTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("vars.kt")
|
@TestMetadata("vars.kt")
|
||||||
public void testVars() throws Exception {
|
public void testVars() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/vars.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/vars.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user