Please sign in to comment.
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).
- Loading branch information...
Showing with 33 additions and 18 deletions.
- +1 −1 src/compiler/scala/tools/nsc/ast/Positions.scala
- +1 −1 src/compiler/scala/tools/nsc/ast/Trees.scala
- +1 −1 src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
- +3 −3 src/compiler/scala/tools/nsc/interactive/RangePositions.scala
- +1 −1 src/compiler/scala/tools/nsc/typechecker/Typers.scala
- +17 −1 src/reflect/scala/reflect/api/Trees.scala
- +1 −1 src/reflect/scala/reflect/internal/Positions.scala
- +1 −1 src/reflect/scala/reflect/internal/Printers.scala
- +7 −8 src/reflect/scala/reflect/internal/Trees.scala