summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-11-06 16:36:05 +1000
committerJason Zaugg <jzaugg@gmail.com>2014-11-06 23:17:41 +1000
commit4a22b918ff938b7c627647e4ed5e74f539e62baa (patch)
treef3317a21b69d10e9d43562295a985eda73df8495 /src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala
parentcd50464cd019bc6a489a72b98293c30b91352bab (diff)
downloadscala-4a22b918ff938b7c627647e4ed5e74f539e62baa.tar.gz
scala-4a22b918ff938b7c627647e4ed5e74f539e62baa.tar.bz2
scala-4a22b918ff938b7c627647e4ed5e74f539e62baa.zip
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`.
Diffstat (limited to 'src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala')
-rw-r--r--src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala2
1 files changed, 1 insertions, 1 deletions
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.