summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-05-13 20:17:25 +0000
committerPaul Phillips <paulp@improving.org>2009-05-13 20:17:25 +0000
commit302427358e0ab97c3a12302e94295ca09465589d (patch)
tree12deb612f9c27f3822a06119897b9439a5ddbcbf /src/compiler
parente9a2726b588273bd9d126f58a23048c14f7d35cb (diff)
downloadscala-302427358e0ab97c3a12302e94295ca09465589d.tar.gz
scala-302427358e0ab97c3a12302e94295ca09465589d.tar.bz2
scala-302427358e0ab97c3a12302e94295ca09465589d.zip
Fix for #1393.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala b/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala
index 7ae2ce7bb1..3563247e75 100644
--- a/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala
@@ -408,7 +408,9 @@ abstract class SuperAccessors extends transform.Transform with transform.TypingT
if (res) {
val host = hostForAccessorOf(sym, currentOwner.enclClass)
- if (host.thisSym != host) {
+ // bug #1393 - as things stand now the "host" could be a package.
+ if (host.isPackageClass) false
+ else if (host.thisSym != host) {
if (host.thisSym.tpe.typeSymbol.hasFlag(JAVA))
errorRestriction(currentOwner.enclClass + " accesses protected " + sym
+ " from self type " + host.thisSym.tpe)