diff options
author | Martin Odersky <odersky@gmail.com> | 2015-12-10 15:39:43 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-12-14 14:30:10 +0100 |
commit | 7cdbcdb3203dfd6a5d2bb099e06321da7d12fcd6 (patch) | |
tree | 1865e012de73daf2a504dc1d325f729abca21e96 /src/dotty/tools/dotc/typer/Typer.scala | |
parent | 3476bab33e9509963fd02aab10b4db3b891c9a85 (diff) | |
download | dotty-7cdbcdb3203dfd6a5d2bb099e06321da7d12fcd6.tar.gz dotty-7cdbcdb3203dfd6a5d2bb099e06321da7d12fcd6.tar.bz2 dotty-7cdbcdb3203dfd6a5d2bb099e06321da7d12fcd6.zip |
Convert super. prefixes of types to this.
`super` has no meaning for type membes. Harmonizing the
prefix to `this` avoids spurious incompatibilities.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Typer.scala | 7 |
1 files changed, 6 insertions, 1 deletions
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") { |