From 7f0637ce073131d8603c567329885e4443cd48d5 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 21 Nov 2016 10:22:07 +0100 Subject: 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. --- src/dotty/tools/dotc/typer/TypeAssigner.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/dotty/tools/dotc/typer/TypeAssigner.scala') 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 => -- cgit v1.2.3