Debugger: fix evaluate expression when breakpoint is set on function without body inside object

#KT-15855 Fixed
This commit is contained in:
Natalia Ukhorskaya
2017-01-27 17:31:11 +03:00
committed by Nikolay Krasko
parent faac1c3156
commit 68f722b337
3 changed files with 23 additions and 19 deletions
@@ -4,6 +4,7 @@ LineBreakpoint created at withoutBodyFunctions.kt:21
LineBreakpoint created at withoutBodyFunctions.kt:27
LineBreakpoint created at withoutBodyFunctions.kt:32
LineBreakpoint created at withoutBodyFunctions.kt:37
LineBreakpoint created at withoutBodyFunctions.kt:43
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! withoutBodyFunctions.WithoutBodyFunctionsKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
withoutBodyFunctions.kt:9
@@ -18,6 +19,8 @@ withoutBodyFunctions.kt:32
Compile bytecode for i
withoutBodyFunctions.kt:37
Compile bytecode for i
withoutBodyFunctions.kt:43
Compile bytecode for test2()
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -36,6 +36,14 @@ fun fooOneLine(i: Int): Int { return 1 }
//Breakpoint!
fun fooEmpty(i: Int) {}
object A {
// EXPRESSION: test2()
// RESULT: 2: I
//Breakpoint!
@JvmStatic fun fooWithoutBodyInsideObject() = test2()
fun test2() = 2
}
fun main(args: Array<String>) {
aGet
aGet2
@@ -44,4 +52,6 @@ fun main(args: Array<String>) {
foo(2)
fooOneLine(2)
fooEmpty(2)
A.fooWithoutBodyInsideObject()
}