Pseudocode: Copy value of JetThisExpression to enclosed JetSimpleNameExpression

This commit is contained in:
Alexey Sedunov
2014-06-10 14:16:51 +04:00
parent 45bd3a520e
commit c9c94a59d3
2 changed files with 3 additions and 0 deletions
@@ -296,6 +296,8 @@ public class JetControlFlowProcessor {
if (resultingDescriptor instanceof ReceiverParameterDescriptor) {
builder.readThis(expression, (ReceiverParameterDescriptor) resultingDescriptor);
}
copyValue(expression, expression.getInstanceReference());
}
@Override
@@ -9,6 +9,7 @@ abstract class Bar {
fun foo() = "foo" + this.$bar
---------------------
"foo" <v0> NEW()
this <v1> COPY
this <v1> NEW()
$bar <v2> NEW(<v1>)
this.$bar <v2> COPY