summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar wuestholz <unknown>2011-08-11 18:08:16 +0200
committerGravatar wuestholz <unknown>2011-08-11 18:08:16 +0200
commitf8c4c182902e44befa91cb45f821a8f24d9ec960 (patch)
treea86183ed7538187ddd2cb7b7e664c1b5045fcc83
parentf7f5305b1dafc53d56fc7201a45ae544c65ed7f1 (diff)
Dafny: Fixed a bug in the printer that led to a stack overflow.
-rw-r--r--.hgignore2
-rw-r--r--Source/Dafny/Printer.cs2
-rw-r--r--Test/dafny0/runtest.bat2
-rw-r--r--Test/dafny1/runtest.bat2
4 files changed, 4 insertions, 4 deletions
diff --git a/.hgignore b/.hgignore
index e6566879..909fc6c1 100644
--- a/.hgignore
+++ b/.hgignore
@@ -10,7 +10,7 @@ syntax: regexp
^Chalice/tests/(examples|permission-model|refinements|general-tests|regressions)/.*\.bpl
Test/([^/]*)/Output
Test/([^/]*)/([^/]*)\.sx
-Test/(dafny0|dafny1|VSI-Benchmarks|vacid0|VSComp2010)/(out\.cs|.*\.dll|.*\.pdb|.*\.exe)
+Test/(dafny0|dafny1|VSI-Benchmarks|vacid0|VSComp2010)/(out\.cs|.*\.dll|.*\.pdb|.*\.exe|.*\.tmp)
Test/desktop/
^.*~$
syntax: glob
diff --git a/Source/Dafny/Printer.cs b/Source/Dafny/Printer.cs
index 63b5f926..34fcb740 100644
--- a/Source/Dafny/Printer.cs
+++ b/Source/Dafny/Printer.cs
@@ -733,7 +733,7 @@ namespace Microsoft.Dafny {
i++;
}
} else if (expr is ParensExpression) {
- PrintExtendedExpr((ParensExpression)expr, indent, isRightmost, endWithCloseParen);
+ PrintExtendedExpr(((ParensExpression)expr).E, indent, isRightmost, endWithCloseParen);
} else {
PrintExpression(expr, indent);
wr.WriteLine(endWithCloseParen ? ")" : "");
diff --git a/Test/dafny0/runtest.bat b/Test/dafny0/runtest.bat
index 8aaa143b..bfa88b54 100644
--- a/Test/dafny0/runtest.bat
+++ b/Test/dafny0/runtest.bat
@@ -23,5 +23,5 @@ for %%f in (TypeTests.dfy NatTypes.dfy SmallTests.dfy Definedness.dfy
CallStmtTests.dfy MultiSets.dfy) do (
echo.
echo -------------------- %%f --------------------
- %DAFNY_EXE% /compile:0 %* %%f
+ %DAFNY_EXE% /compile:0 /dprint:out.dfy.tmp %* %%f
)
diff --git a/Test/dafny1/runtest.bat b/Test/dafny1/runtest.bat
index 57ac97e3..50bf20e0 100644
--- a/Test/dafny1/runtest.bat
+++ b/Test/dafny1/runtest.bat
@@ -28,7 +28,7 @@ for %%f in (Queue.dfy PriorityQueue.dfy ExtensibleArray.dfy
echo -------------------- %%f --------------------
REM The following line will just run the verifier
- IF "%COMPILEDAFNY%"=="" %DAFNY_EXE% /compile:0 %* %%f
+ IF "%COMPILEDAFNY%"=="" %DAFNY_EXE% /compile:0 /dprint:out.dfy.tmp %* %%f
REM Alternatively, the following lines also produce C# code and compile it
IF NOT "%COMPILEDAFNY%"=="" %DAFNY_EXE% %* %%f