From 4a22b918ff938b7c627647e4ed5e74f539e62baa Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Thu, 6 Nov 2014 16:36:05 +1000 Subject: SI-7019 Fix crasher with private[this] extension methods When we move the body of value class methods to the corresponding extension method, we typecheck a forward method that remains in the class. In order to allow access, this commit weakens the access of `private[local]` extension methods to `private`. --- src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler') diff --git a/src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala b/src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala index 228c9da624..116047a2ad 100644 --- a/src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala +++ b/src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala @@ -208,7 +208,7 @@ abstract class ExtensionMethods extends Transform with TypingTransformers { def makeExtensionMethodSymbol = { val extensionName = extensionNames(origMeth).head.toTermName val extensionMeth = ( - companion.moduleClass.newMethod(extensionName, tree.pos.focus, origMeth.flags & ~OVERRIDE & ~PROTECTED | FINAL) + companion.moduleClass.newMethod(extensionName, tree.pos.focus, origMeth.flags & ~OVERRIDE & ~PROTECTED & ~LOCAL | FINAL) setAnnotations origMeth.annotations ) origMeth.removeAnnotation(TailrecClass) // it's on the extension method, now. -- cgit v1.2.3