summaryrefslogtreecommitdiff
path: root/Source/Dafny/DafnyAst.cs
diff options
context:
space:
mode:
authorGravatar Rustan Leino <unknown>2014-04-04 10:58:05 -0700
committerGravatar Rustan Leino <unknown>2014-04-04 10:58:05 -0700
commit6c8b9222e5eb724258ddb92662c9fcbe470f1a1d (patch)
treec09a504f43d03aaaa8394986265b9a82b5c5056a /Source/Dafny/DafnyAst.cs
parente8bae7e26441d2077d33a8b771c7d559eaee5d71 (diff)
parent4937d6e714913a2645d3fd00be376ada31057433 (diff)
Merge
Diffstat (limited to 'Source/Dafny/DafnyAst.cs')
-rw-r--r--Source/Dafny/DafnyAst.cs18
1 files changed, 15 insertions, 3 deletions
diff --git a/Source/Dafny/DafnyAst.cs b/Source/Dafny/DafnyAst.cs
index 0caa97f2..c3d23dae 100644
--- a/Source/Dafny/DafnyAst.cs
+++ b/Source/Dafny/DafnyAst.cs
@@ -4627,6 +4627,7 @@ namespace Microsoft.Dafny {
public readonly Expression Seq;
public readonly Expression Index;
public readonly Expression Value;
+ public Expression ResolvedUpdateExpr; // May be filled in during resolution
public SeqUpdateExpr(IToken tok, Expression seq, Expression index, Expression val)
: base(tok) {
@@ -4637,13 +4638,24 @@ namespace Microsoft.Dafny {
Seq = seq;
Index = index;
Value = val;
+ ResolvedUpdateExpr = null;
}
public override IEnumerable<Expression> SubExpressions {
get {
- yield return Seq;
- yield return Index;
- yield return Value;
+ if (ResolvedUpdateExpr == null)
+ {
+ yield return Seq;
+ yield return Index;
+ yield return Value;
+ }
+ else
+ {
+ foreach (var e in ResolvedUpdateExpr.SubExpressions)
+ {
+ yield return e;
+ }
+ }
}
}
}