summaryrefslogtreecommitdiff
path: root/Source/Dafny/Compiler.cs
diff options
context:
space:
mode:
authorGravatar qunyanm <unknown>2015-11-14 14:50:26 -0800
committerGravatar qunyanm <unknown>2015-11-14 14:50:26 -0800
commit854acf0f7f5aa105500c6d0ee0fcf0d4c918a81e (patch)
tree782088f9c132efca00ff8b042d4cf32f41bbf82d /Source/Dafny/Compiler.cs
parentcfd717411a1d82e4d0b1ad845cbe0984ecc1618f (diff)
Fix issue 94. Allow tuple-based assignment in statement contexts.
Diffstat (limited to 'Source/Dafny/Compiler.cs')
-rw-r--r--Source/Dafny/Compiler.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/Dafny/Compiler.cs b/Source/Dafny/Compiler.cs
index 2786133e..82795480 100644
--- a/Source/Dafny/Compiler.cs
+++ b/Source/Dafny/Compiler.cs
@@ -1764,6 +1764,14 @@ namespace Microsoft.Dafny {
wr.Write(TrStmt(s.Update, indent).ToString());
}
+ } else if (stmt is LetStmt) {
+ var s = (LetStmt)stmt;
+ for (int i = 0; i < s.LHSs.Count; i++) {
+ var lhs = s.LHSs[i];
+ if (Contract.Exists(lhs.Vars, bv => !bv.IsGhost)) {
+ TrCasePatternOpt(lhs, s.RHSs[i], null, indent, wr, false);
+ }
+ }
} else if (stmt is ModifyStmt) {
var s = (ModifyStmt)stmt;
if (s.Body != null) {