diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2009-07-21 08:23:10 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2009-07-21 08:23:10 +0000 |
commit | 294000998f2c244d46785a2d6873fe33d9a6e110 (patch) | |
tree | 1684812b3ae0f30cdbb16dae5586bb21e5090004 | |
parent | a91a8b2ac22d49b1690482fbf1271d203ebb457b (diff) | |
download | scala-294000998f2c244d46785a2d6873fe33d9a6e110.tar.gz scala-294000998f2c244d46785a2d6873fe33d9a6e110.tar.bz2 scala-294000998f2c244d46785a2d6873fe33d9a6e110.zip |
fixed TreePrinter for annotations
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/TreePrinters.scala | 5 |
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 |