diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowProcessor.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowProcessor.java index 91e6937ba5b..80177d269f4 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowProcessor.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowProcessor.java @@ -718,6 +718,10 @@ public class JetControlFlowProcessor { generateInstructions(initializer, false); builder.write(property, property); } + JetExpression delegate = property.getDelegateExpression(); + if (delegate != null) { + generateInstructions(delegate, false); + } for (JetPropertyAccessor accessor : property.getAccessors()) { generateInstructions(accessor, false); } diff --git a/compiler/testData/cfg/DelegatedProperty.instructions b/compiler/testData/cfg/DelegatedProperty.instructions new file mode 100644 index 00000000000..a57d42d8854 --- /dev/null +++ b/compiler/testData/cfg/DelegatedProperty.instructions @@ -0,0 +1,30 @@ +== a == +val a = Delegate() +--------------------- +L0: + NEXT:[v(val a = Delegate())] PREV:[] + v(val a = Delegate()) NEXT:[r(Delegate)] PREV:[] + r(Delegate) NEXT:[r(Delegate())] PREV:[v(val a = Delegate())] + r(Delegate()) NEXT:[w(a)] PREV:[r(Delegate)] + w(a) NEXT:[] PREV:[r(Delegate())] +L1: + NEXT:[] PREV:[w(a)] +error: + NEXT:[] PREV:[] +sink: + NEXT:[] PREV:[, ] +===================== +== b == +val b by a +--------------------- +L0: + NEXT:[v(val b by a)] PREV:[] + v(val b by a) NEXT:[r(a)] PREV:[] + r(a) NEXT:[] PREV:[v(val b by a)] +L1: + NEXT:[] PREV:[r(a)] +error: + NEXT:[] PREV:[] +sink: + NEXT:[] PREV:[, ] +===================== diff --git a/compiler/testData/cfg/DelegatedProperty.jet b/compiler/testData/cfg/DelegatedProperty.jet new file mode 100644 index 00000000000..478b174c6e4 --- /dev/null +++ b/compiler/testData/cfg/DelegatedProperty.jet @@ -0,0 +1,3 @@ +val a = Delegate() + +val b by a \ No newline at end of file