Debugger: Allow super calls (KT-20560)
This commit is contained in:
@@ -28,4 +28,4 @@ open class Base {
|
||||
// RESULT: Expecting an element; looking at ERROR_ELEMENT '(1,6) in /fragment.kt
|
||||
|
||||
// EXPRESSION: super.baseFun()
|
||||
// RESULT: Evaluation of 'super' call expression is not supported
|
||||
// RESULT: VOID_VALUE
|
||||
@@ -2,6 +2,7 @@ LineBreakpoint created at errors.kt:13
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
errors.kt:13
|
||||
Compile bytecode for super.baseFun()
|
||||
Compile bytecode for prop += 1
|
||||
prop2 +=2
|
||||
prop + prop2
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package superCallsCaptured
|
||||
|
||||
fun main() {
|
||||
Bar().foo()
|
||||
}
|
||||
|
||||
open class Foo {
|
||||
open fun foo() = 5
|
||||
}
|
||||
|
||||
class Bar : Foo() {
|
||||
override fun foo(): Int {
|
||||
block {
|
||||
//Breakpoint!
|
||||
val a = this@Bar
|
||||
}
|
||||
return 6
|
||||
}
|
||||
}
|
||||
|
||||
fun block(block: () -> Unit) {
|
||||
block()
|
||||
}
|
||||
|
||||
// EXPRESSION: foo()
|
||||
// RESULT: 6: I
|
||||
|
||||
// EXPRESSION: super.foo()
|
||||
// RESULT: 5: I
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at superCallsCaptured.kt:15
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
superCallsCaptured.kt:15
|
||||
Compile bytecode for foo()
|
||||
Compile bytecode for super.foo()
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package superCallsSimple
|
||||
|
||||
fun main() {
|
||||
Bar().foo()
|
||||
}
|
||||
|
||||
open class Foo {
|
||||
open fun foo() = 5
|
||||
}
|
||||
|
||||
class Bar : Foo() {
|
||||
override fun foo(): Int {
|
||||
//Breakpoint!
|
||||
return 6
|
||||
}
|
||||
}
|
||||
|
||||
// EXPRESSION: foo()
|
||||
// RESULT: 6: I
|
||||
|
||||
// EXPRESSION: super.foo()
|
||||
// RESULT: 5: I
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at superCallsSimple.kt:14
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
superCallsSimple.kt:14
|
||||
Compile bytecode for foo()
|
||||
Compile bytecode for super.foo()
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Reference in New Issue
Block a user