diff options
author | Paul Phillips <paulp@improving.org> | 2012-10-21 07:30:38 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-10-21 07:35:14 -0700 |
commit | c130e19c1cb4f4a1126d543f29a6f0408f25763f (patch) | |
tree | 5a94b89ecbe13088be860393f2a3b4034371cda0 /src/reflect | |
parent | 6daf9c642578c0af178075f5cc10e2a19c35e12a (diff) | |
download | scala-c130e19c1cb4f4a1126d543f29a6f0408f25763f.tar.gz scala-c130e19c1cb4f4a1126d543f29a6f0408f25763f.tar.bz2 scala-c130e19c1cb4f4a1126d543f29a6f0408f25763f.zip |
Fix SI-6552, regression with self types.
In 6eb55d4b7a we put in a remedy for an old issue SI-4560 which
had accumulated a number of sketchy partial remedies which carried
no tests to illustrate their necessity. Looks like at least one of
those was doing something useful. Here's to reversion-reversion.
This reverts commit c8bdf199, which itself reverted cb4fd6582.
Diffstat (limited to 'src/reflect')
-rw-r--r-- | src/reflect/scala/reflect/internal/Types.scala | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/reflect/scala/reflect/internal/Types.scala b/src/reflect/scala/reflect/internal/Types.scala index ab33c29153..403bf7d492 100644 --- a/src/reflect/scala/reflect/internal/Types.scala +++ b/src/reflect/scala/reflect/internal/Types.scala @@ -1409,9 +1409,11 @@ trait Types extends api.Types { self: SymbolTable => final class UniqueThisType(sym: Symbol) extends ThisType(sym) { } object ThisType extends ThisTypeExtractor { - def apply(sym: Symbol): Type = - if (phase.erasedTypes) sym.tpe - else unique(new UniqueThisType(sym)) + def apply(sym: Symbol): Type = ( + if (!phase.erasedTypes) unique(new UniqueThisType(sym)) + else if (sym.isImplClass) sym.typeOfThis + else sym.tpe + ) } /** A class for singleton types of the form `<prefix>.<sym.name>.type`. |