summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2009-12-22 23:42:37 +0000
committerMartin Odersky <odersky@gmail.com>2009-12-22 23:42:37 +0000
commitcb4fd65825f3c88908103e48d0d7e89d70d26c22 (patch)
tree4a50c35832443a2bf09a2084811446f301aad0b4 /src/compiler
parent361a7a40d35e09d7f622fcafd28531172a139e0e (diff)
downloadscala-cb4fd65825f3c88908103e48d0d7e89d70d26c22.tar.gz
scala-cb4fd65825f3c88908103e48d0d7e89d70d26c22.tar.bz2
scala-cb4fd65825f3c88908103e48d0d7e89d70d26c22.zip
tentative fix for RC5 lift build problem.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Types.scala4
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Contexts.scala1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala
index b20ef3cd4e..d87a30f847 100644
--- a/src/compiler/scala/tools/nsc/symtab/Types.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Types.scala
@@ -2312,7 +2312,9 @@ A type's typeSymbol should never be inspected directly.
/** The canonical creator for this-types */
def mkThisType(sym: Symbol): Type = {
- if (phase.erasedTypes) sym.tpe else unique(new ThisType(sym) with UniqueType)
+ if (!phase.erasedTypes) unique(new ThisType(sym) with UniqueType)
+ else if (sym.isImplClass) sym.typeOfThis
+ else sym.tpe
}
/** The canonical creator for single-types */
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
index 19eb2c90af..2acc09b70e 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
@@ -422,6 +422,7 @@ trait Contexts { self: Analyzer =>
||
(accessWithin(ab) || accessWithin(ab.linkedClassOfClass)) &&
(!sym.hasFlag(LOCAL) ||
+ sym.owner.isImplClass || // allow private local accesses to impl classes
(sym hasFlag PROTECTED) && isSubThisType(pre, sym.owner) ||
pre =:= sym.owner.thisType)
||