From 838cbe623c142b7005446793948097f679219fe3 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Tue, 4 Dec 2012 16:06:20 +0100 Subject: 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). --- src/compiler/scala/tools/nsc/ast/Positions.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler/scala/tools/nsc/ast/Positions.scala') diff --git a/src/compiler/scala/tools/nsc/ast/Positions.scala b/src/compiler/scala/tools/nsc/ast/Positions.scala index 0503c5fb10..49569f5e05 100644 --- a/src/compiler/scala/tools/nsc/ast/Positions.scala +++ b/src/compiler/scala/tools/nsc/ast/Positions.scala @@ -20,7 +20,7 @@ trait Positions extends scala.reflect.internal.Positions { // When we prune due to encountering a position, traverse the // pruned children so we can warn about those lacking positions. t.children foreach { c => - if (c.isDummy) () + if (!c.canHaveAttrs) () else if (c.pos == NoPosition) { reporter.warning(t.pos, " Positioned tree has unpositioned child in phase " + globalPhase) inform("parent: " + treeSymStatus(t)) -- cgit v1.2.3