Separately process inline function default impl body compilation (non general inline magic),

Fix for KT-10670 Debugger: Evaluate Expression/Watches fail for inline function parameter initialized with default value

 #KT-10670 Fixed
This commit is contained in:
Michael Bogdanov
2016-02-19 17:24:34 +03:00
parent 7bfb5a0c60
commit f149f16882
6 changed files with 49 additions and 16 deletions
@@ -0,0 +1,8 @@
LineBreakpoint created at remappedParameterInInline.kt:11
!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! remappedParameterInInline.RemappedParameterInInlineKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
remappedParameterInInline.kt:11
Compile bytecode for p
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,19 @@
package remappedParameterInInline
inline fun watch(p: String, f: (String) -> Int) {
f(p)
}
inline fun inlineDefault(p: Int = 1, f: (Int) -> Unit) {
// EXPRESSION: p
// RESULT: 1: I
//Breakpoint!
f(p)
}
fun main(args: Array<String>) {
val local = "mno"
watch(local) { it.length }
inlineDefault { it }
}