diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala | 2 |
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 3e86c74c57..a94e9e7dc2 100644 --- a/src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala +++ b/src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala @@ -109,7 +109,7 @@ abstract class ExtensionMethods extends Transform with TypingTransformers { val companion = currentOwner.companionModule val origMeth = tree.symbol val extensionName = extensionNames(origMeth).head - val extensionMeth = companion.moduleClass.newMethod(extensionName, origMeth.pos, origMeth.flags & ~OVERRIDE | FINAL) + val extensionMeth = companion.moduleClass.newMethod(extensionName, origMeth.pos, origMeth.flags & ~OVERRIDE & ~PROTECTED | FINAL) .setAnnotations(origMeth.annotations) companion.info.decls.enter(extensionMeth) val newInfo = extensionMethInfo(extensionMeth, origMeth.info, currentOwner) |