Fix breakpoints when inline call is in qualified expression (KT-16062)

Scope is stored for DOT_QUALIFIED_EXPRESSION not directly for
CALL_EXPRESSION.

 #KT-16062 Fixed
This commit is contained in:
Nikolay Krasko
2017-03-03 17:23:24 +03:00
parent 2719016539
commit d886cd7d06
4 changed files with 40 additions and 2 deletions
@@ -0,0 +1,8 @@
LineBreakpoint created at stopInExtensionInlineCall.kt:8
!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! stopInExtensionInlineCall.StopInExtensionInlineCallKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
stopInExtensionInlineCall.kt:8
stopInExtensionInlineCall.kt:9
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,15 @@
package stopInExtensionInlineCall
fun main(args: Array<String>) {
val a = 1
12.apply {
{
//Breakpoint!
foo(a)
}()
}
}
inline fun <T> T.inlineApply(block: T.() -> kotlin.Unit) { this.block() }
fun foo(a: Any) {}