diff options
author | leino <unknown> | 2015-11-27 18:03:34 -0800 |
---|---|---|
committer | leino <unknown> | 2015-11-27 18:03:34 -0800 |
commit | 33ae6b4bf0dc3f2c80abbd3c26356f16ded3aaee (patch) | |
tree | 5754d8d56d31a14b20736a09227c4b253e9e2c4f /Source/Dafny/Printer.cs | |
parent | 66d8663d16def735d8983f67aaffbf342e88a5f5 (diff) | |
parent | b8fad094ad74180ca16670bebe602737d856b5da (diff) |
Merge
Diffstat (limited to 'Source/Dafny/Printer.cs')
-rw-r--r-- | Source/Dafny/Printer.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/Dafny/Printer.cs b/Source/Dafny/Printer.cs index 145e82e7..0a25b941 100644 --- a/Source/Dafny/Printer.cs +++ b/Source/Dafny/Printer.cs @@ -841,11 +841,22 @@ namespace Microsoft.Dafny { wr.Write("}"); } else if (stmt is ForallStmt) { - var s = (ForallStmt)stmt; + var s = (ForallStmt)stmt;
+ Attributes attributes = s.Attributes;
+ if (attributes == null && s.ForallExpressions != null) {
+ foreach (Expression expr in s.ForallExpressions) {
+ ForallExpr e = (ForallExpr)expr;
+ while (e != null && attributes == null) {
+ attributes = e.Attributes;
+ e = (ForallExpr)e.SplitQuantifierExpression;
+ }
+ if (attributes != null) { break; }
+ }
+ } wr.Write("forall"); if (s.BoundVars.Count != 0) { wr.Write(" "); - PrintQuantifierDomain(s.BoundVars, s.Attributes, s.Range); + PrintQuantifierDomain(s.BoundVars, attributes, s.Range); } if (s.Ens.Count == 0) { wr.Write(" "); |