Debugger: Support parameters of inlined lambda in evaluate expression
This commit is contained in:
@@ -3,6 +3,7 @@ LineBreakpoint created at inlineFunctionalExpression.kt:9
|
||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
inlineFunctionalExpression.kt:9
|
||||
inlineFunctionalExpression.kt:9
|
||||
Compile bytecode for it
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
@@ -3,6 +3,7 @@ LineBreakpoint created at inlineLambda.kt:9
|
||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
inlineLambda.kt:9
|
||||
inlineLambda.kt:9
|
||||
Compile bytecode for it
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
LineBreakpoint created at parametersOfInlineFun.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 !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! parametersOfInlineFun.ParametersOfInlineFunPackage
|
||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
parametersOfInlineFun.kt:8
|
||||
parametersOfInlineFun.kt:8
|
||||
Compile bytecode for primitive
|
||||
Compile bytecode for it
|
||||
Compile bytecode for array
|
||||
Compile bytecode for str
|
||||
Compile bytecode for list
|
||||
Compile bytecode for `$receiver`.prop
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -0,0 +1,11 @@
|
||||
LineBreakpoint created at parametersOfInlineFunSeveralOnLine.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 !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! parametersOfInlineFunSeveralOnLine.ParametersOfInlineFunSeveralOnLinePackage
|
||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
parametersOfInlineFunSeveralOnLine.kt:8
|
||||
parametersOfInlineFunSeveralOnLine.kt:8
|
||||
parametersOfInlineFunSeveralOnLine.kt:8
|
||||
parametersOfInlineFunSeveralOnLine.kt:8
|
||||
Compile bytecode for it
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+2
-2
@@ -3,8 +3,8 @@ package inlineFunctionalExpression
|
||||
fun main(args: Array<String>) {
|
||||
val a = array(1)
|
||||
// EXPRESSION: it
|
||||
// RESULT: Unresolved reference: it
|
||||
// STEP_INTO: 1
|
||||
// RESULT: 1: I
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
a.map(fun (it): Int { return it * 1 })
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,8 +3,8 @@ package inlineLambda
|
||||
fun main(args: Array<String>) {
|
||||
val a = array(1)
|
||||
// EXPRESSION: it
|
||||
// RESULT: Unresolved reference: it
|
||||
// STEP_INTO: 1
|
||||
// RESULT: 1: I
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
a.map { it * 1 }
|
||||
}
|
||||
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
// Check that evaluate expression works inside inline function
|
||||
package parametersOfInlineFun
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = A(1)
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
a.foo { 1 + 1 }
|
||||
}
|
||||
|
||||
inline fun A.foo(f: (i: Int) -> Unit) {
|
||||
val primitive = 1
|
||||
val array = arrayOf(1)
|
||||
val str = "str"
|
||||
val list = listOf("str")
|
||||
f(1)
|
||||
}
|
||||
|
||||
class A(val prop: Int)
|
||||
|
||||
// EXPRESSION: primitive
|
||||
// RESULT: 1: I
|
||||
|
||||
// EXPRESSION: it
|
||||
// RESULT: 1: I
|
||||
|
||||
// EXPRESSION: array
|
||||
// RESULT: instance of java.lang.Integer[1] (id=ID): [Ljava/lang/Integer;
|
||||
|
||||
// EXPRESSION: str
|
||||
// RESULT: "str": Ljava/lang/String;
|
||||
|
||||
// EXPRESSION: list
|
||||
// RESULT: instance of java.util.Collections$SingletonList(id=ID): Ljava/util/Collections$SingletonList;
|
||||
|
||||
// EXPRESSION: `$receiver`.prop
|
||||
// RESULT: 1: I
|
||||
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
// Check that evaluate expression works inside inline function
|
||||
package parametersOfInlineFunSeveralOnLine
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = A()
|
||||
// RESUME: 3
|
||||
//Breakpoint!
|
||||
a.foo { 1 + 1 }.bar { 1 + 1 }
|
||||
}
|
||||
|
||||
inline fun A.foo(f: (i: Int) -> Unit): A {
|
||||
f(1)
|
||||
return this
|
||||
}
|
||||
|
||||
inline fun A.bar(f: (s: String) -> Unit): A {
|
||||
f("str")
|
||||
return this
|
||||
}
|
||||
|
||||
class A()
|
||||
|
||||
// EXPRESSION: it
|
||||
// RESULT: "str": Ljava/lang/String;
|
||||
Reference in New Issue
Block a user