diff options
author | qunyanm <unknown> | 2016-02-26 10:37:53 -0800 |
---|---|---|
committer | qunyanm <unknown> | 2016-02-26 10:37:53 -0800 |
commit | 273a5368fb5b7e919011c3774317c302d1bad87d (patch) | |
tree | b0c4fa2cb9f95b9ea0bf98627319c80191d9c2b4 /Source | |
parent | 13a88d7263c02590f5be9bb9944c0ab43b76bccc (diff) |
Fix issue 140. Move the initializion of _this before the TAIL_CALL_START label.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/Dafny/Compiler.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Dafny/Compiler.cs b/Source/Dafny/Compiler.cs index f5f95bd2..d6b2d9ba 100644 --- a/Source/Dafny/Compiler.cs +++ b/Source/Dafny/Compiler.cs @@ -937,10 +937,10 @@ namespace Microsoft.Dafny { Error("Method {0} has no body", wr, m.FullName);
} else {
if (m.IsTailRecursive) {
- Indent(indent, wr); wr.WriteLine("TAIL_CALL_START: ;");
if (!m.IsStatic) {
Indent(indent + IndentAmount, wr); wr.WriteLine("var _this = this;");
}
+ Indent(indent, wr); wr.WriteLine("TAIL_CALL_START: ;");
}
Contract.Assert(enclosingMethod == null);
enclosingMethod = m;
|