This commit is contained in:
Svetlana Isakova
2012-08-20 19:22:33 +04:00
parent ed1f22111b
commit 2798ea4563
@@ -2559,23 +2559,18 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> {
VariableDescriptor variableDescriptor = bindingContext.get(BindingContext.VARIABLE, property); VariableDescriptor variableDescriptor = bindingContext.get(BindingContext.VARIABLE, property);
Type sharedVarType;
int index;
if (JetPsiUtil.isScriptDeclaration(property)) { if (JetPsiUtil.isScriptDeclaration(property)) {
return StackValue.none(); return StackValue.none();
} }
else { int index = lookupLocal(variableDescriptor);
index = lookupLocal(variableDescriptor);
if (index < 0) { if (index < 0) {
throw new IllegalStateException("Local variable not found for " + variableDescriptor); throw new IllegalStateException("Local variable not found for " + variableDescriptor);
}
sharedVarType = typeMapper.getSharedVarType(variableDescriptor);
assert variableDescriptor != null;
} }
Type sharedVarType = typeMapper.getSharedVarType(variableDescriptor);
assert variableDescriptor != null;
Type varType = asmType(variableDescriptor.getType()); Type varType = asmType(variableDescriptor.getType());
if (sharedVarType != null) { if (sharedVarType != null) {
v.anew(sharedVarType); v.anew(sharedVarType);