diff options
Diffstat (limited to 'heat')
-rw-r--r-- | heat/HeatVisitor.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/heat/HeatVisitor.java b/heat/HeatVisitor.java index 15971d3..9886fdc 100644 --- a/heat/HeatVisitor.java +++ b/heat/HeatVisitor.java @@ -1058,6 +1058,9 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<TypeBundle>> n.getClass().getSimpleName())); /////////////////////////////////////////////////////////////// _ret = n.f1.accept(this, argu); + if (!_ret.isBool()) + throw new TypecheckException(String.format("%s tried with a non-bool!", + n.getClass().getSimpleName())); /////////////////////////////////////////////////////////////// MinimalLogger.info(String.format("<- %s with %s", n.getClass().getSimpleName(), |