summaryrefslogtreecommitdiff
path: root/Source/Dafny/Printer.ssc
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Dafny/Printer.ssc')
-rw-r--r--Source/Dafny/Printer.ssc8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/Dafny/Printer.ssc b/Source/Dafny/Printer.ssc
index 755c10b2..bf07e122 100644
--- a/Source/Dafny/Printer.ssc
+++ b/Source/Dafny/Printer.ssc
@@ -510,8 +510,14 @@ namespace Microsoft.Dafny {
if (rhs is ExprRhs) {
PrintExpression(((ExprRhs)rhs).Expr);
} else if (rhs is TypeRhs) {
+ TypeRhs t = (TypeRhs)rhs;
wr.Write("new ");
- PrintType(((TypeRhs)rhs).Type);
+ PrintType(t.EType);
+ if (t.ArraySize != null) {
+ wr.Write("[");
+ PrintExpression(t.ArraySize);
+ wr.Write("]");
+ }
} else {
assert false; // unexpected RHS
}