summaryrefslogtreecommitdiff
path: root/Dafny
diff options
context:
space:
mode:
authorGravatar Jason Koenig <unknown>2011-06-29 17:57:40 -0700
committerGravatar Jason Koenig <unknown>2011-06-29 17:57:40 -0700
commit909ec736aac212ce00a40af3a1335b1202269d1a (patch)
treea3ec7b662a3d0385b3482f835dbb543a76a34be2 /Dafny
parent0c344651c1b3d9b4f1e073980b3c4cc9332a6d54 (diff)
Fixed bug in compiler relating to returns with parameters.
Diffstat (limited to 'Dafny')
-rw-r--r--Dafny/Compiler.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Dafny/Compiler.cs b/Dafny/Compiler.cs
index 1f9208db..920105a9 100644
--- a/Dafny/Compiler.cs
+++ b/Dafny/Compiler.cs
@@ -642,9 +642,9 @@ namespace Microsoft.Dafny {
wr.WriteLine("goto after_{0};", s.TargetStmt.Labels.UniqueId);
} else if (stmt is ReturnStmt) {
var s = (ReturnStmt)stmt;
- Indent(indent);
- TrStmt(s.hiddenUpdate, indent);
- wr.WriteLine("return;");
+ if (s.hiddenUpdate != null)
+ TrStmt(s.hiddenUpdate, indent);
+ Indent(indent); wr.WriteLine("return;");
} else if (stmt is UpdateStmt) {
var s = (UpdateStmt)stmt;
var resolved = s.ResolvedStatements;