From 294000998f2c244d46785a2d6873fe33d9a6e110 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Tue, 21 Jul 2009 08:23:10 +0000 Subject: fixed TreePrinter for annotations --- src/compiler/scala/tools/nsc/ast/TreePrinters.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/scala/tools/nsc/ast/TreePrinters.scala b/src/compiler/scala/tools/nsc/ast/TreePrinters.scala index 120658b4e6..76837cf071 100644 --- a/src/compiler/scala/tools/nsc/ast/TreePrinters.scala +++ b/src/compiler/scala/tools/nsc/ast/TreePrinters.scala @@ -119,7 +119,7 @@ abstract class TreePrinters { } def printAnnotations(tree: Tree) { - if (tree.symbol.rawInfo.isComplete) { + if (tree.tpe != null) { val annots = tree.symbol.annotations if (!annots.isEmpty) { annots foreach { annot => print("@"+annot+" ") } @@ -278,6 +278,9 @@ abstract class TreePrinters { case Assign(lhs, rhs) => print(lhs); print(" = "); print(rhs) + case AssignOrNamedArg(lhs, rhs) => + print(lhs); print(" = "); print(rhs) + case If(cond, thenp, elsep) => print("if ("); print(cond); print(")"); indent; println print(thenp); undent -- cgit v1.2.3