aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/ast/untpd.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-11-21 10:22:07 +0100
committerMartin Odersky <odersky@gmail.com>2016-11-21 10:22:07 +0100
commit7f0637ce073131d8603c567329885e4443cd48d5 (patch)
treef94fa7e704b901d51fec272176090e174ffbb106 /src/dotty/tools/dotc/ast/untpd.scala
parent5c7617b006fe4446a105b3db4916956a92826304 (diff)
downloaddotty-7f0637ce073131d8603c567329885e4443cd48d5.tar.gz
dotty-7f0637ce073131d8603c567329885e4443cd48d5.tar.bz2
dotty-7f0637ce073131d8603c567329885e4443cd48d5.zip
Make This and Super take idents as qualifier/mixin
The qualifier of a This and the mixin of a Super were names, which meant that their positions were lost. Now they are untyped idents.
Diffstat (limited to 'src/dotty/tools/dotc/ast/untpd.scala')
-rw-r--r--src/dotty/tools/dotc/ast/untpd.scala8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/ast/untpd.scala b/src/dotty/tools/dotc/ast/untpd.scala
index ac35ad09c..6c5210287 100644
--- a/src/dotty/tools/dotc/ast/untpd.scala
+++ b/src/dotty/tools/dotc/ast/untpd.scala
@@ -80,6 +80,10 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
case class ContextBounds(bounds: TypeBoundsTree, cxBounds: List[Tree]) extends TypTree
case class PatDef(mods: Modifiers, pats: List[Tree], tpt: Tree, rhs: Tree) extends DefTree
+ @sharable object EmptyTypeIdent extends Ident(tpnme.EMPTY) with WithoutTypeOrPos[Untyped] {
+ override def isEmpty = true
+ }
+
/** A block arising from a right-associative infix operation, where, e.g.
*
* a +: b
@@ -225,8 +229,8 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
def BackquotedIdent(name: Name): BackquotedIdent = new BackquotedIdent(name)
def Select(qualifier: Tree, name: Name): Select = new Select(qualifier, name)
def SelectWithSig(qualifier: Tree, name: Name, sig: Signature): Select = new SelectWithSig(qualifier, name, sig)
- def This(qual: TypeName): This = new This(qual)
- def Super(qual: Tree, mix: TypeName): Super = new Super(qual, mix)
+ def This(qual: Ident): This = new This(qual)
+ def Super(qual: Tree, mix: Ident): Super = new Super(qual, mix)
def Apply(fun: Tree, args: List[Tree]): Apply = new Apply(fun, args)
def TypeApply(fun: Tree, args: List[Tree]): TypeApply = new TypeApply(fun, args)
def Literal(const: Constant): Literal = new Literal(const)