Fix receiver evaluation for primitive receiver types

This commit is contained in:
Yan Zhulanow
2018-12-17 23:05:02 +09:00
parent f6cc686095
commit 7de5ddaac9
4 changed files with 54 additions and 7 deletions
@@ -0,0 +1,31 @@
package thisLabels
fun main() {
block(1) a@ {
//Breakpoint!
inlineBlock(2) b@ {
//Breakpoint!
block(3) c@ {
//Breakpoint!
val a = 5
}
}
}
}
fun <T> block(t: T, block: T.() -> Unit) {
t.block()
}
fun <T> T.inlineBlock(t: T, block: T.() -> Unit) {
t.block()
}
// EXPRESSION: this
// RESULT: 1: I
// EXPRESSION: this
// RESULT: 2: I
// EXPRESSION: this@c
// RESULT: 3: I
@@ -0,0 +1,14 @@
LineBreakpoint created at thisLabels.kt:6
LineBreakpoint created at thisLabels.kt:8
LineBreakpoint created at thisLabels.kt:10
Run Java
Connected to the target VM
thisLabels.kt:6
Compile bytecode for this
thisLabels.kt:8
Compile bytecode for this
thisLabels.kt:10
Compile bytecode for this + this@a + this@b + this@c
Disconnected from the target VM
Process finished with exit code 0