aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-12-10 15:39:43 +0100
committerMartin Odersky <odersky@gmail.com>2015-12-14 14:30:10 +0100
commit7cdbcdb3203dfd6a5d2bb099e06321da7d12fcd6 (patch)
tree1865e012de73daf2a504dc1d325f729abca21e96 /src/dotty/tools/dotc/typer/Typer.scala
parent3476bab33e9509963fd02aab10b4db3b891c9a85 (diff)
downloaddotty-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.scala7
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") {