From: bdemsky Date: Fri, 15 Jun 2007 08:14:59 +0000 (+0000) Subject: fix type checking. We now complain about wrong type declarations X-Git-Tag: preEdgeChange~547 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=340bfacc5aa19f8c6b05ddf4023617a7d396f434;p=IRC.git fix type checking. We now complain about wrong type declarations --- diff --git a/Robust/src/IR/Tree/SemanticCheck.java b/Robust/src/IR/Tree/SemanticCheck.java index d9b21abe..2e2bd5e2 100644 --- a/Robust/src/IR/Tree/SemanticCheck.java +++ b/Robust/src/IR/Tree/SemanticCheck.java @@ -532,6 +532,11 @@ public class SemanticCheck { TypeDescriptor typetolookin=con.getType(); checkTypeDescriptor(typetolookin); + if (td!=null&&!typeutil.isSuperorType(td, typetolookin)) + throw new Error(typetolookin + " isn't a "+td); + + + /* Check flag effects */ if (con.getFlagEffects()!=null) { FlagEffects fe=con.getFlagEffects();