summaryrefslogtreecommitdiff
path: root/heat/HeatVisitor.java
diff options
context:
space:
mode:
authorbd-912 <bdunahu@colostate.edu>2024-05-09 00:36:50 -0600
committerbd-912 <bdunahu@colostate.edu>2024-05-09 00:36:50 -0600
commitf86e714a4fdebb994101813a5fa6664f5883a0ab (patch)
tree727bec17afbb6fc373d6a6b73a69ba47ad1b7a4c /heat/HeatVisitor.java
parentf59241de07bfc0170fe3a18dc279d2a66bd58fdb (diff)
Many final bug-fixes in heat visitor, symbol table
Diffstat (limited to 'heat/HeatVisitor.java')
-rw-r--r--heat/HeatVisitor.java3
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(),