Pseudocode: Bind nondeterministic jump caused by local declaration to declaration iself instead of its parent element

#KT-6261 Fixed
 #KT-6416 Fixed
This commit is contained in:
Alexey Sedunov
2015-01-12 14:15:34 +03:00
parent 81715d1fca
commit 9278dee1a4
13 changed files with 145 additions and 4 deletions
@@ -114,12 +114,9 @@ public class JetControlFlowProcessor {
}
private void processLocalDeclaration(@NotNull JetDeclaration subroutine) {
JetElement parent = PsiTreeUtil.getParentOfType(subroutine, JetElement.class);
assert parent != null;
Label afterDeclaration = builder.createUnboundLabel("after local declaration");
builder.nondeterministicJump(afterDeclaration, parent, null);
builder.nondeterministicJump(afterDeclaration, subroutine, null);
generate(subroutine);
builder.bindLabel(afterDeclaration);
}