diff options
author | Martin Odersky <odersky@gmail.com> | 2016-11-21 10:22:07 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-11-21 10:22:07 +0100 |
commit | 7f0637ce073131d8603c567329885e4443cd48d5 (patch) | |
tree | f94fa7e704b901d51fec272176090e174ffbb106 /src/dotty/tools/dotc/typer/TypeAssigner.scala | |
parent | 5c7617b006fe4446a105b3db4916956a92826304 (diff) | |
download | dotty-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/typer/TypeAssigner.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/TypeAssigner.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/TypeAssigner.scala b/src/dotty/tools/dotc/typer/TypeAssigner.scala index 1599d95e6..ee2d68278 100644 --- a/src/dotty/tools/dotc/typer/TypeAssigner.scala +++ b/src/dotty/tools/dotc/typer/TypeAssigner.scala @@ -282,7 +282,7 @@ trait TypeAssigner { } def assignType(tree: untpd.This)(implicit ctx: Context) = { - val cls = qualifyingClass(tree, tree.qual, packageOK = false) + val cls = qualifyingClass(tree, tree.qual.name, packageOK = false) tree.withType(cls.thisType) } @@ -291,7 +291,7 @@ trait TypeAssigner { val qtype @ ThisType(_) = qual.tpe val cls = qtype.cls - def findMixinSuper(site: Type): Type = site.parents filter (_.name == mix) match { + def findMixinSuper(site: Type): Type = site.parents filter (_.name == mix.name) match { case p :: Nil => p case Nil => |