Skip to content

Commit 945fefb

Browse files
committed
Do not emit static forwarders in non-static modules.
1 parent 96dfb35 commit 945fefb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/dotty/tools/backend/jvm/DottyBackendInterface.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -622,8 +622,8 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
622622
def isSynchronized: Boolean = sym is Flags.Synchronized
623623
def isNonBottomSubClass(other: Symbol): Boolean = sym.derivesFrom(other)
624624
def hasAnnotation(ann: Symbol): Boolean = toDenot(sym).hasAnnotation(ann)
625-
def shouldEmitForwarders: Boolean = //exitingPickler { !(sym.name.toString contains '$')
626-
(sym is Flags.Module) && !(sym is Flags.ImplClass) /// !sym.isNestedClass
625+
def shouldEmitForwarders: Boolean =
626+
(sym is Flags.Module) && !(sym is Flags.ImplClass) && sym.isStatic
627627
def isJavaEntryPoint: Boolean = CollectEntryPoints.isJavaEntryPoint(sym)
628628

629629
def isClassConstructor: Boolean = toDenot(sym).isClassConstructor

0 commit comments

Comments
 (0)