summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar qunyanm <qunyanm@hotmail.com>2015-11-25 11:53:46 -0800
committerGravatar qunyanm <qunyanm@hotmail.com>2015-11-25 11:53:46 -0800
commit36a96f3c90bcd2212c7d3d8f24815abf88b56ba5 (patch)
treedc7b3a02e04b5f045762eb4c9dd2cbd50473b5e6
parentfe8de9444fb6ce90216a9b8268d8a13daa9a9f2a (diff)
parenta799e128af68911228d081202ba0bd294ced4a4f (diff)
Merge remote-tracking branch 'refs/remotes/origin/dafny-bug-fix'
-rw-r--r--Source/VCGeneration/ConditionGeneration.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/VCGeneration/ConditionGeneration.cs b/Source/VCGeneration/ConditionGeneration.cs
index 6a2eec29..8c54bdf0 100644
--- a/Source/VCGeneration/ConditionGeneration.cs
+++ b/Source/VCGeneration/ConditionGeneration.cs
@@ -1133,7 +1133,12 @@ namespace VC {
}
if (returnBlocks > 1) {
string unifiedExitLabel = "GeneratedUnifiedExit";
- Block unifiedExit = new Block(new Token(-17, -4), unifiedExitLabel, new List<Cmd>(), new ReturnCmd(Token.NoToken));
+ Block unifiedExit;
+ if (impl.StructuredStmts != null) {
+ unifiedExit = new Block(new Token(-17, -4), unifiedExitLabel, new List<Cmd>(), new ReturnCmd(impl.StructuredStmts.EndCurly));
+ } else {
+ unifiedExit = new Block(new Token(-17, -4), unifiedExitLabel, new List<Cmd>(), new ReturnCmd(Token.NoToken));
+ }
Contract.Assert(unifiedExit != null);
foreach (Block b in impl.Blocks) {
if (b.TransferCmd is ReturnCmd) {