summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2009-07-21 08:23:10 +0000
committerLukas Rytz <lukas.rytz@epfl.ch>2009-07-21 08:23:10 +0000
commit294000998f2c244d46785a2d6873fe33d9a6e110 (patch)
tree1684812b3ae0f30cdbb16dae5586bb21e5090004
parenta91a8b2ac22d49b1690482fbf1271d203ebb457b (diff)
downloadscala-294000998f2c244d46785a2d6873fe33d9a6e110.tar.gz
scala-294000998f2c244d46785a2d6873fe33d9a6e110.tar.bz2
scala-294000998f2c244d46785a2d6873fe33d9a6e110.zip
fixed TreePrinter for annotations
-rw-r--r--src/compiler/scala/tools/nsc/ast/TreePrinters.scala5
1 files changed, 4 insertions, 1 deletions
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