diff options
author | Martin Odersky <odersky@gmail.com> | 2014-08-27 10:48:16 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-08-27 10:55:47 +0200 |
commit | bfb328ff64dcfa103c91dd0cd55a617e370d6ef3 (patch) | |
tree | b7003776657a486c8fbfac43a7812b10555b0d5a /src/dotty/tools/dotc/core/TypeOps.scala | |
parent | 292ce6844a212b47defc671c91396d7cec86833b (diff) | |
download | dotty-bfb328ff64dcfa103c91dd0cd55a617e370d6ef3.tar.gz dotty-bfb328ff64dcfa103c91dd0cd55a617e370d6ef3.tar.bz2 dotty-bfb328ff64dcfa103c91dd0cd55a617e370d6ef3.zip |
Make ThisTypes take TypeRefs instead of ClassSymbols
This avoids stale symbol errors and does not need the somewhat
unsystematic symbol rebinding of the last commit.
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeOps.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/TypeOps.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/TypeOps.scala b/src/dotty/tools/dotc/core/TypeOps.scala index f9ff42709..efd7fcca3 100644 --- a/src/dotty/tools/dotc/core/TypeOps.scala +++ b/src/dotty/tools/dotc/core/TypeOps.scala @@ -30,8 +30,8 @@ trait TypeOps { this: Context => val sym = tp.symbol if (sym.isStatic) tp else tp.derivedSelect(asSeenFrom(tp.prefix, pre, cls, theMap)) - case ThisType(thiscls) => - toPrefix(pre, cls, thiscls) + case tp: ThisType => + toPrefix(pre, cls, tp.cls) case _: BoundType | NoPrefix => tp case tp: RefinedType => @@ -224,7 +224,7 @@ trait TypeOps { this: Context => */ def forwardRef(argSym: Symbol, from: Symbol, to: TypeBounds, cls: ClassSymbol, decls: Scope) = argSym.info match { - case info @ TypeBounds(lo2 @ TypeRef(ThisType(_), name), hi2) => + case info @ TypeBounds(lo2 @ TypeRef(_: ThisType, name), hi2) => if (name == from.name && (lo2 eq hi2) && info.variance == to.variance && |