From 7cdbcdb3203dfd6a5d2bb099e06321da7d12fcd6 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 10 Dec 2015 15:39:43 +0100 Subject: Convert super. prefixes of types to this. `super` has no meaning for type membes. Harmonizing the prefix to `this` avoids spurious incompatibilities. --- src/dotty/tools/dotc/typer/Typer.scala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/typer') diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index 08ed04286..e5509d50f 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -332,7 +332,12 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit case pt: SelectionProto if pt.name == nme.CONSTRUCTOR => true case _ => false } - assignType(cpy.Super(tree)(qual1, tree.mix), qual1, inConstrCall) + pt match { + case pt: SelectionProto if pt.name.isTypeName => + qual1 // don't do super references for types; they are meaningless anyway + case _ => + assignType(cpy.Super(tree)(qual1, tree.mix), qual1, inConstrCall) + } } def typedLiteral(tree: untpd.Literal)(implicit ctx: Context) = track("typedLiteral") { -- cgit v1.2.3