Hide synthetic variables for local functions and destructured lambda parameters (Kotlin variables)
This commit is contained in:
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
package lambdaParameterMangling
|
||||
|
||||
private data class Foo(val a: String, val b: Int)
|
||||
|
||||
private fun foo(foo: Foo, block: (Foo) -> Unit) {
|
||||
block(foo)
|
||||
}
|
||||
|
||||
fun main() {
|
||||
foo(Foo("a", 5)) { (a, b) ->
|
||||
//Breakpoint!
|
||||
val c = 5
|
||||
}
|
||||
}
|
||||
|
||||
// SHOW_KOTLIN_VARIABLES
|
||||
// PRINT_FRAME
|
||||
|
||||
// EXPRESSION: a.length + b
|
||||
// RESULT: 6: I
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
LineBreakpoint created at lambdaParameterMangling.kt:12
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
lambdaParameterMangling.kt:12
|
||||
Compile bytecode for a.length + b
|
||||
frame = invoke:12, LambdaParameterManglingKt$main$1 {lambdaParameterMangling}
|
||||
local = a: java.lang.String = a (sp = lambdaParameterMangling.kt, 10)
|
||||
field = value: char[] = {char[1]@uniqueID} (sp = String.!EXT!)
|
||||
element = 0 = 'a' 97
|
||||
field = hash: int = 0 (sp = String.!EXT!)
|
||||
local = b: int = 5 (sp = lambdaParameterMangling.kt, 10)
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
package localFunctionMangling
|
||||
|
||||
fun main() {
|
||||
fun foo() {}
|
||||
|
||||
//Breakpoint!
|
||||
val a = 5
|
||||
}
|
||||
|
||||
// SHOW_KOTLIN_VARIABLES
|
||||
// PRINT_FRAME
|
||||
|
||||
// EXPRESSION: 1
|
||||
// RESULT: 1: I
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at localFunctionMangling.kt:7
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
localFunctionMangling.kt:7
|
||||
Compile bytecode for 1
|
||||
frame = main:7, LocalFunctionManglingKt {localFunctionMangling}
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Reference in New Issue
Block a user