diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-12-04 16:06:20 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-12-06 23:17:26 +0100 |
commit | 838cbe623c142b7005446793948097f679219fe3 (patch) | |
tree | 33c23634d44cd4f52ca6ba3c2579ba3480b9d706 /src/reflect/scala/reflect/internal/Positions.scala | |
parent | 7ee299b50ff9d6b99ae3bcfe8d700274b9f0ef44 (diff) | |
download | scala-838cbe623c142b7005446793948097f679219fe3.tar.gz scala-838cbe623c142b7005446793948097f679219fe3.tar.bz2 scala-838cbe623c142b7005446793948097f679219fe3.zip |
DummyTree => CannotHaveAttrs
This looks like a much more specific name than a generic "dummy" prefix.
CannotHaveAttrs also doesn't imply that an implementing tree should
satisfy some bigger contract. EmptyTree and emptyValDef are very unlike
each other, so there's no point in trying to unify them.
Also DummyTree.isEmpty is no longer automatically true. The notion of
trees not having positions and types by design (i.e. EmptyTree + empty
TypeTrees + emptyValDef + the new pendingSuperCall) is quite different
from the notion of an empty tree in a sense of a tree being a null object
(i.e. EmptyTree + empty TypeTrees).
Diffstat (limited to 'src/reflect/scala/reflect/internal/Positions.scala')
-rw-r--r-- | src/reflect/scala/reflect/internal/Positions.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/reflect/scala/reflect/internal/Positions.scala b/src/reflect/scala/reflect/internal/Positions.scala index b65df0e70b..f8c670827a 100644 --- a/src/reflect/scala/reflect/internal/Positions.scala +++ b/src/reflect/scala/reflect/internal/Positions.scala @@ -38,7 +38,7 @@ trait Positions extends api.Positions { self: SymbolTable => protected class DefaultPosAssigner extends PosAssigner { var pos: Position = _ override def traverse(t: Tree) { - if (t.isDummy) () + if (!t.canHaveAttrs) () else if (t.pos == NoPosition) { t.setPos(pos) super.traverse(t) // TODO: bug? shouldn't the traverse be outside of the if? |