summaryrefslogtreecommitdiff
path: root/Source/Dafny/DafnyAst.cs
diff options
context:
space:
mode:
authorGravatar leino <unknown>2015-11-11 17:36:58 -0800
committerGravatar leino <unknown>2015-11-11 17:36:58 -0800
commitcfd717411a1d82e4d0b1ad845cbe0984ecc1618f (patch)
treeb580a8dcd73cfefbb24d7b5c13102c82b59165f1 /Source/Dafny/DafnyAst.cs
parent7cc9a11d13a1d43d6e7beb4f874bb086f73804c4 (diff)
parent324c2f4bf8842cce7922e7ff7972216dfc06546f (diff)
Merge
Diffstat (limited to 'Source/Dafny/DafnyAst.cs')
-rw-r--r--Source/Dafny/DafnyAst.cs17
1 files changed, 8 insertions, 9 deletions
diff --git a/Source/Dafny/DafnyAst.cs b/Source/Dafny/DafnyAst.cs
index fdbd484e..9ed3b7e0 100644
--- a/Source/Dafny/DafnyAst.cs
+++ b/Source/Dafny/DafnyAst.cs
@@ -4885,7 +4885,12 @@ namespace Microsoft.Dafny {
public override Expression StepExpr(Expression line0, Expression line1)
{
- return new BinaryExpr(line0.tok, Op, line0, line1);
+ if (Op == BinaryExpr.Opcode.Exp) {
+ // The order of operands is reversed so that it can be turned into implication during resolution
+ return new BinaryExpr(line0.tok, Op, line1, line0);
+ } else {
+ return new BinaryExpr(line0.tok, Op, line0, line1);
+ }
}
public override string ToString()
@@ -6779,14 +6784,8 @@ namespace Microsoft.Dafny {
Contract.Requires(e0 != null);
Contract.Requires(e1 != null);
this.Op = op;
- if (op == Opcode.Exp) {
- // The order of operands is reversed so that it can be turned into implication during resolution
- this.E0 = e1;
- this.E1 = e0;
- } else {
- this.E0 = e0;
- this.E1 = e1;
- }
+ this.E0 = e0;
+ this.E1 = e1;
}
/// <summary>