From 945fefb6c6e54ccfd660314bf8c74fca7ee8496a Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Thu, 13 Aug 2015 11:22:05 +0200 Subject: [PATCH] Do not emit static forwarders in non-static modules. --- src/dotty/tools/backend/jvm/DottyBackendInterface.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala index d0993a73b42c..916ab32981a7 100644 --- a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala +++ b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala @@ -622,8 +622,8 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{ def isSynchronized: Boolean = sym is Flags.Synchronized def isNonBottomSubClass(other: Symbol): Boolean = sym.derivesFrom(other) def hasAnnotation(ann: Symbol): Boolean = toDenot(sym).hasAnnotation(ann) - def shouldEmitForwarders: Boolean = //exitingPickler { !(sym.name.toString contains '$') - (sym is Flags.Module) && !(sym is Flags.ImplClass) /// !sym.isNestedClass + def shouldEmitForwarders: Boolean = + (sym is Flags.Module) && !(sym is Flags.ImplClass) && sym.isStatic def isJavaEntryPoint: Boolean = CollectEntryPoints.isJavaEntryPoint(sym) def isClassConstructor: Boolean = toDenot(sym).isClassConstructor