From f8c4c182902e44befa91cb45f821a8f24d9ec960 Mon Sep 17 00:00:00 2001 From: wuestholz Date: Thu, 11 Aug 2011 18:08:16 +0200 Subject: Dafny: Fixed a bug in the printer that led to a stack overflow. --- .hgignore | 2 +- Source/Dafny/Printer.cs | 2 +- Test/dafny0/runtest.bat | 2 +- Test/dafny1/runtest.bat | 2 +- 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 -- cgit v1.2.3