Debugger: Support synchronized blocks and functions in evaluator (KT-11888)
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
package synchronizedBlock
|
||||
|
||||
fun main() {
|
||||
//Breakpoint!
|
||||
val a = 5
|
||||
}
|
||||
|
||||
// EXPRESSION: synchronized(Any()) { "foo" }
|
||||
// RESULT: "foo": Ljava/lang/String;
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
class Foo {
|
||||
@Synchronized
|
||||
fun foo(): Int {
|
||||
return 5
|
||||
}
|
||||
}
|
||||
|
||||
Foo().foo()
|
||||
|
||||
// RESULT: 5: I
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
LineBreakpoint created at synchronizedBlock.kt:5
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
synchronizedBlock.kt:5
|
||||
Compile bytecode for synchronized(Any()) { "foo" }
|
||||
Compile bytecode for class Foo {
|
||||
@Synchronized
|
||||
fun foo(): Int {
|
||||
return 5
|
||||
}
|
||||
}
|
||||
|
||||
Foo().foo()
|
||||
|
||||
// RESULT: 5: I
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Reference in New Issue
Block a user