Evaluate Expression: fix function call from base class on object with subtype
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at funFromSuperClass.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! funFromSuperClass.FunFromSuperClassPackage
|
||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
funFromSuperClass.kt:11
|
||||
Compile bytecode for foo()
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -0,0 +1,20 @@
|
||||
package funFromSuperClass
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
Derived().test()
|
||||
}
|
||||
|
||||
open class Base {
|
||||
fun foo() = 1
|
||||
|
||||
fun test() {
|
||||
//Breakpoint!
|
||||
val a = 1
|
||||
}
|
||||
}
|
||||
|
||||
class Derived: Base()
|
||||
|
||||
|
||||
// EXPRESSION: foo()
|
||||
// RESULT: 1: I
|
||||
Reference in New Issue
Block a user