From: stephey Date: Tue, 29 Mar 2011 22:54:40 +0000 (+0000) Subject: Added an error case X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=05f8e4e5c9d24ef16db9213ac7346a3406db3eca;p=IRC.git Added an error case --- diff --git a/Robust/src/IR/Tree/SemanticCheck.java b/Robust/src/IR/Tree/SemanticCheck.java index 9b68aa0b..14c3e6dc 100644 --- a/Robust/src/IR/Tree/SemanticCheck.java +++ b/Robust/src/IR/Tree/SemanticCheck.java @@ -611,6 +611,8 @@ public class SemanticCheck { fd = new FieldDescriptor(new Modifiers(Modifiers.PUBLIC|Modifiers.FINAL), new TypeDescriptor(TypeDescriptor.INT), fieldname, null, false); fd.setAsEnum(); fd.setEnumValue(value); + } else if(fd == null) { + throw new Error("Could not find field "+ fieldname + " in "+fan.printNode(0)+" in "+md + " (Line: "+fan.getNumLine()+")"); } else if(fd.isStatic()) { // check if this field is a static field if(fd.getExpressionNode() != null) {