diff options
author | Dan Liew <daniel.liew@imperial.ac.uk> | 2015-01-25 20:58:15 +0000 |
---|---|---|
committer | Dan Liew <daniel.liew@imperial.ac.uk> | 2015-01-25 20:58:15 +0000 |
commit | ca82edae68c55548b70530f02a7d346870aece04 (patch) | |
tree | 88c4424976b90bba1ee90324978a0b0c99485b2b /Source/Core/Duplicator.cs | |
parent | ffcf2c27da335ff452a0c2388c33195ff59c8550 (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/Core/Duplicator.cs')
-rw-r--r-- | Source/Core/Duplicator.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/Duplicator.cs b/Source/Core/Duplicator.cs index 759077b5..4350571a 100644 --- a/Source/Core/Duplicator.cs +++ b/Source/Core/Duplicator.cs @@ -290,7 +290,7 @@ namespace Microsoft.Boogie { return impl;
}
- public override LiteralExpr VisitLiteralExpr(LiteralExpr node) {
+ public override Expr VisitLiteralExpr(LiteralExpr node) {
//Contract.Requires(node != null);
Contract.Ensures(Contract.Result<LiteralExpr>() != null);
return base.VisitLiteralExpr((LiteralExpr)node.Clone());
|