better assertion in ExpressionCodegen

This commit is contained in:
Stepan Koltsov
2012-06-01 18:04:46 +04:00
parent aaa03100cf
commit 563d5cfd03
@@ -2265,7 +2265,9 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> {
VariableDescriptor variableDescriptor = bindingContext.get(BindingContext.VARIABLE, property);
int index = lookupLocal(variableDescriptor);
assert index >= 0;
if (index < 0) {
throw new IllegalStateException("Local variable not found for " + variableDescriptor);
}
final Type sharedVarType = typeMapper.getSharedVarType(variableDescriptor);
assert variableDescriptor != null;