Evaluate Expression: fix function call from base class on object with subtype

This commit is contained in:
Natalia Ukhorskaya
2014-09-19 13:58:56 +04:00
parent b5f738db07
commit 2b388ed308
5 changed files with 73 additions and 28 deletions
@@ -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