summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/internal/Positions.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-11-25 22:00:11 +0100
committerEugene Burmako <xeno.by@gmail.com>2012-12-06 23:17:26 +0100
commit0ebf72b9498108e67c2133c6522c436af50a18e8 (patch)
treea7d992954695d2ca6ec7b1f1a190ff677018fb16 /src/reflect/scala/reflect/internal/Positions.scala
parent40063b0009d55ed527bf1625d99a168a8faa4124 (diff)
downloadscala-0ebf72b9498108e67c2133c6522c436af50a18e8.tar.gz
scala-0ebf72b9498108e67c2133c6522c436af50a18e8.tar.bz2
scala-0ebf72b9498108e67c2133c6522c436af50a18e8.zip
introduces global.pendingSuperCall
Similarly to global.emptyValDef, which is a dummy that stands for an empty self-type, this commit introduces global.pendingSuperCall, which stands for a yet-to-be-filled-in call to a superclass constructor. pendingSuperCall is emitted by Parsers.template, treated specially by Typers.typedParentType and replaced with a real superclass ctor call by Typers.typedTemplate. To avoid copy/paste, this commit also factors out and unifies dumminess of EmptyTree, emptyValDef and pendingSuperCall - they all don't have a position and actively refuse to gain one, same story for tpe.
Diffstat (limited to 'src/reflect/scala/reflect/internal/Positions.scala')
-rw-r--r--src/reflect/scala/reflect/internal/Positions.scala2
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 faa161d6b1..b65df0e70b 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 eq EmptyTree) ()
+ if (t.isDummy) ()
else if (t.pos == NoPosition) {
t.setPos(pos)
super.traverse(t) // TODO: bug? shouldn't the traverse be outside of the if?