Evaluate Expression: box and unbox arguments before running JDIEval
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at boxParam.kt:13
|
||||
!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! boxParam.BoxParamPackage
|
||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
boxParam.kt:13
|
||||
Compile bytecode for nullableInt?.plus(1)
|
||||
Compile bytecode for nullableByte?.plus(1)
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at unboxParam.kt:12
|
||||
!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! unboxParam.UnboxParamPackage
|
||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
unboxParam.kt:12
|
||||
Compile bytecode for fooInt(nullableInt)
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -0,0 +1,14 @@
|
||||
package boxParam
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val nullableInt: Int? = 1
|
||||
val nullableByte: Byte? = 1
|
||||
|
||||
// EXPRESSION: nullableInt?.plus(1)
|
||||
// RESULT: instance of java.lang.Integer(id=ID): Ljava/lang/Integer;
|
||||
|
||||
// EXPRESSION: nullableByte?.plus(1)
|
||||
// RESULT: instance of java.lang.Integer(id=ID): Ljava/lang/Integer;
|
||||
//Breakpoint!
|
||||
val i = 1
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package unboxParam
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val nullableInt = fooNullableInt()
|
||||
if (nullableInt == null) {
|
||||
return
|
||||
}
|
||||
|
||||
// EXPRESSION: fooInt(nullableInt)
|
||||
// RESULT: 1: I
|
||||
//Breakpoint!
|
||||
val a = fooInt(nullableInt)
|
||||
}
|
||||
|
||||
fun fooNullableInt(): Int? = 1
|
||||
|
||||
fun fooInt(param: Int) = param
|
||||
Reference in New Issue
Block a user