summaryrefslogtreecommitdiff
path: root/Source/AbsInt
diff options
context:
space:
mode:
authorGravatar Dan Liew <daniel.liew@imperial.ac.uk>2015-01-25 20:58:15 +0000
committerGravatar Dan Liew <daniel.liew@imperial.ac.uk>2015-01-25 20:58:15 +0000
commitca82edae68c55548b70530f02a7d346870aece04 (patch)
tree88c4424976b90bba1ee90324978a0b0c99485b2b /Source/AbsInt
parentffcf2c27da335ff452a0c2388c33195ff59c8550 (diff)
Change the return type of StandardVisitor.VisitLiteralExpr() from
LiteralExpr to Expr. Enforcing the return type be LiteralExpr is too restrictive. There is precedence for this. For example VisitNAryExpr() returns an Expr not an NAryExpr. Unfortunately this a breaking API change so anyone who subclasses the StandardVisitor (or one of its sub classes) and overrides this method will get compilation errors until they change the return type. a visitor that does constant folding of an Expr tree
Diffstat (limited to 'Source/AbsInt')
-rw-r--r--Source/AbsInt/IntervalDomain.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/AbsInt/IntervalDomain.cs b/Source/AbsInt/IntervalDomain.cs
index 5a4c606f..1ac80970 100644
--- a/Source/AbsInt/IntervalDomain.cs
+++ b/Source/AbsInt/IntervalDomain.cs
@@ -659,7 +659,7 @@ namespace Microsoft.Boogie.AbstractInterpretation
Lo = Hi = null;
return base.VisitExpr(node);
}
- public override LiteralExpr VisitLiteralExpr(LiteralExpr node) {
+ public override Expr VisitLiteralExpr(LiteralExpr node) {
if (node.Val is BigNum) {
var n = ((BigNum)node.Val).ToBigInteger;
Lo = n;