Make breakpoints work inside nameless function bodies in inline calls

This commit is contained in:
Nikolay Krasko
2016-11-23 17:29:07 +03:00
parent 89ac89f0c6
commit b007306740
4 changed files with 56 additions and 9 deletions
@@ -0,0 +1,8 @@
LineBreakpoint created at stopInNamelessFunInInlineCall.kt:9
!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! stopInNamelessFunInInlineCall.StopInNamelessFunInInlineCallKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
stopInNamelessFunInInlineCall.kt:9
stopInNamelessFunInInlineCall.kt:10
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,19 @@
package stopInNamelessFunInInlineCall
fun main(args: Array<String>) {
val a = 1
inlineFun(fun (): Unit {
{
//Breakpoint!
foo(a)
foo(a)
}()
})
}
inline fun inlineFun(f: () -> Any) {
f()
}
fun foo(a: Any) {}