summaryrefslogtreecommitdiff
path: root/sources/meta
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-07-02 15:51:59 +0000
committerpaltherr <paltherr@epfl.ch>2003-07-02 15:51:59 +0000
commitf0e3edad2c1134c9a6297e20ea5db89bb35b1152 (patch)
treec41c0545578d6290f71b1e2c64b68e1e3a563b18 /sources/meta
parenta461a7982bda781fabcdaf452e250e6e325a25d4 (diff)
downloadscala-f0e3edad2c1134c9a6297e20ea5db89bb35b1152.tar.gz
scala-f0e3edad2c1134c9a6297e20ea5db89bb35b1152.tar.bz2
scala-f0e3edad2c1134c9a6297e20ea5db89bb35b1152.zip
- Fixed to not set symbol if the source tree's ...
- Fixed to not set symbol if the source tree's symbol is null
Diffstat (limited to 'sources/meta')
-rw-r--r--sources/meta/scalac/ast/MetaStrictTreeCopier.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/sources/meta/scalac/ast/MetaStrictTreeCopier.java b/sources/meta/scalac/ast/MetaStrictTreeCopier.java
index cd0ec6bf58..62823377dd 100644
--- a/sources/meta/scalac/ast/MetaStrictTreeCopier.java
+++ b/sources/meta/scalac/ast/MetaStrictTreeCopier.java
@@ -22,8 +22,10 @@ public class MetaStrictTreeCopier extends AbstractTreeMethodExpander {
writer.print(node.getType(0)).print(" t = make.");
node.printCall(writer, "tree.pos", withSymbol).println(";");
writer.println("t.type = tree.type;");
- if (!withSymbol && node.hasSymbol() && !node.hasLinkedFields())
- writer.println("t.setSymbol(tree.symbol());");
+ if (!withSymbol && node.hasSymbol() && !node.hasLinkedFields()) {
+ symbol.print(writer, true).println(" = tree.symbol();");
+ writer.println("if ("+symbol+" != null) t.setSymbol("+symbol+");");
+ }
writer.println("return t;");
writer.rbrace();