diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2010-12-07 16:21:53 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2010-12-07 16:21:53 +0000 |
commit | 2087a249ac07195e3c78417f2dfca6587e461f99 (patch) | |
tree | abfb543b40cb779be381475c33e817e87d5cc3fb /src | |
parent | 0f188e1b47932b05d65d699dba88dd98dd191c17 (diff) | |
download | scala-2087a249ac07195e3c78417f2dfca6587e461f99.tar.gz scala-2087a249ac07195e3c78417f2dfca6587e461f99.tar.bz2 scala-2087a249ac07195e3c78417f2dfca6587e461f99.zip |
follow up on fix #3946.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/ant/Scaladoc.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 7 | ||||
-rw-r--r-- | src/swing/scala/swing/RichWindow.scala | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/ant/Scaladoc.scala b/src/compiler/scala/tools/ant/Scaladoc.scala index be5311b471..720aa105d1 100644 --- a/src/compiler/scala/tools/ant/Scaladoc.scala +++ b/src/compiler/scala/tools/ant/Scaladoc.scala @@ -384,7 +384,7 @@ class Scaladoc extends ScalaMatchingTask { /** This is forwarding method to circumvent bug #281 in Scala 2. Remove when * bug has been corrected. */ - override def getDirectoryScanner(baseDir: java.io.File) = + override protected def getDirectoryScanner(baseDir: java.io.File) = super.getDirectoryScanner(baseDir) /** Transforms a string name into a file relative to the provided base diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index 5c8e474d58..67664b7262 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -329,9 +329,10 @@ abstract class RefChecks extends InfoTransform { // todo: align accessibility implication checking with isAccessible in Contexts val ob = other.accessBoundary(member.owner) val mb = member.accessBoundary(member.owner) - def isOverrideAccessOK = member.isPublic || { // member is public, definitely same or relaxed access - (!other.isProtected || member.isProtected) && // if o is protected, so is m - (!isRootOrNone(ob) && ob.hasTransOwner(mb)) // m relaxes o's access boundary + def isOverrideAccessOK = member.isPublic || { // member is public, definitely same or relaxed access + (!other.isProtected || member.isProtected) && // if o is protected, so is m + ((!isRootOrNone(ob) && ob.hasTransOwner(mb)) || // m relaxes o's access boundary + other.isJavaDefined) // overriding a protected java member, see #3946 } if (!isOverrideAccessOK) { overrideAccessError() diff --git a/src/swing/scala/swing/RichWindow.scala b/src/swing/scala/swing/RichWindow.scala index dcad382a33..10e396247e 100644 --- a/src/swing/scala/swing/RichWindow.scala +++ b/src/swing/scala/swing/RichWindow.scala @@ -78,7 +78,7 @@ class Frame extends RichWindow { override lazy val peer: JFrame with InterfaceMixin = new JFrame with InterfaceMixin with SuperMixin protected trait SuperMixin extends JFrame { - override def processWindowEvent(e: java.awt.event.WindowEvent) { + override protected def processWindowEvent(e: java.awt.event.WindowEvent) { super.processWindowEvent(e) if (e.getID() == java.awt.event.WindowEvent.WINDOW_CLOSING) closeOperation() |