Debugger: Fix evaluation for local extension functions (KT-13188)

This commit is contained in:
Yan Zhulanow
2019-04-16 22:29:57 +03:00
parent 8b3c22cea6
commit cbbb3c35da
5 changed files with 49 additions and 17 deletions
@@ -0,0 +1,17 @@
package localFunctionsWithReceivers
fun main() {
fun String.foo(s: String) = this + 1
fun String.foo() = this + 2
val x = "a".foo("b")
val y = "b".foo()
//Breakpoint!
val a = x + y
}
// EXPRESSION: "a".foo("b")
// RESULT: "a1": Ljava/lang/String;
// EXPRESSION: "b".foo()
// RESULT: "b2": Ljava/lang/String;
@@ -0,0 +1,9 @@
LineBreakpoint created at localFunctionsWithReceivers.kt:10
Run Java
Connected to the target VM
localFunctionsWithReceivers.kt:10
Compile bytecode for "a".foo("b")
Compile bytecode for "b".foo()
Disconnected from the target VM
Process finished with exit code 0