summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/Dafny/Dafny.atg2
-rw-r--r--Source/Dafny/Parser.cs2
2 files changed, 2 insertions, 2 deletions
diff --git a/Source/Dafny/Dafny.atg b/Source/Dafny/Dafny.atg
index 5280521f..50f6859e 100644
--- a/Source/Dafny/Dafny.atg
+++ b/Source/Dafny/Dafny.atg
@@ -1418,7 +1418,7 @@ UnaryExpression<out Expression/*!*/ e>
)
.
Lhs<out Expression e>
-= (. e = null; // to please the compiler
+= (. e = dummyExpr; // the assignment is to please the compiler, the dummy value to satisfy contracts in the event of a parse error
.)
( DottedIdentifiersAndFunction<out e>
{ Suffix<ref e> }
diff --git a/Source/Dafny/Parser.cs b/Source/Dafny/Parser.cs
index 306dd369..c422a619 100644
--- a/Source/Dafny/Parser.cs
+++ b/Source/Dafny/Parser.cs
@@ -1732,7 +1732,7 @@ List<Expression/*!*/>/*!*/ decreases, ref Attributes decAttrs, ref Attributes mo
}
void Lhs(out Expression e) {
- e = null; // to please the compiler
+ e = dummyExpr; // the assignment is to please the compiler, the dummy value to satisfy contracts in the event of a parse error
if (la.kind == 1) {
DottedIdentifiersAndFunction(out e);