diff options
author | Martin Odersky <odersky@gmail.com> | 2014-11-04 20:15:05 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-11-09 19:08:59 +0100 |
commit | 6098546fad7e6e8709cc18a126b0e655f439d5bc (patch) | |
tree | 8cb58de0cc0dbfee413015494df566e21130bc68 /src/dotty/tools/dotc/typer/TypeAssigner.scala | |
parent | e445000dc747b55351f3bc60bb5f849bb6aac096 (diff) | |
download | dotty-6098546fad7e6e8709cc18a126b0e655f439d5bc.tar.gz dotty-6098546fad7e6e8709cc18a126b0e655f439d5bc.tar.bz2 dotty-6098546fad7e6e8709cc18a126b0e655f439d5bc.zip |
Fixed typing of supertypes.
Previous version could fail where the thisType widened to an explicit self type.
Diffstat (limited to 'src/dotty/tools/dotc/typer/TypeAssigner.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/TypeAssigner.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/TypeAssigner.scala b/src/dotty/tools/dotc/typer/TypeAssigner.scala index ed10c7644..765c6bea7 100644 --- a/src/dotty/tools/dotc/typer/TypeAssigner.scala +++ b/src/dotty/tools/dotc/typer/TypeAssigner.scala @@ -238,7 +238,8 @@ trait TypeAssigner { def assignType(tree: untpd.Super, qual: Tree, inConstrCall: Boolean, mixinClass: Symbol = NoSymbol)(implicit ctx: Context) = { val mix = tree.mix - val cls = qual.tpe.widen.typeSymbol + val qtype @ ThisType(_) = qual.tpe + val cls = qtype.cls def findMixinSuper(site: Type): Type = site.parents filter (_.name == mix) match { case p :: Nil => |