diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-02-10 20:35:02 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-02-11 22:47:28 +0100 |
commit | 6a7d793388628d9e8d20c59cc327843f33615db0 (patch) | |
tree | fa14cbb835b4e662b87393bac01c90496a094211 /src/compiler | |
parent | 2e8ede532a3af72abd22fc6c27af652c2a7206ae (diff) | |
download | scala-6a7d793388628d9e8d20c59cc327843f33615db0.tar.gz scala-6a7d793388628d9e8d20c59cc327843f33615db0.tar.bz2 scala-6a7d793388628d9e8d20c59cc327843f33615db0.zip |
SI-7091 Don't try to put a protected accessor in a package.
This shows up when a protected[pack] class has a constructor
with a default argument.
Regressed in f708b87 / SI-2296.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala b/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala index a0fec75fd2..67639eb530 100644 --- a/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala +++ b/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala @@ -291,6 +291,7 @@ abstract class SuperAccessors extends transform.Transform with transform.TypingT currentClass.isTrait && sym.isProtected && sym.enclClass != currentClass + && !sym.owner.isPackageClass // SI-7091 no accessor needed package owned (ie, top level) symbols && !sym.owner.isTrait && (sym.owner.enclosingPackageClass != currentClass.enclosingPackageClass) && (qual.symbol.info.member(sym.name) ne NoSymbol) |