File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
compiler/src/dotty/tools/backend/jvm Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ import tpd._
3131
3232import scala .tools .asm
3333import StdNames .{nme , str }
34- import NameKinds .{DefaultGetterName , ExpandedName }
34+ import NameKinds .{DefaultGetterName , ExpandedName , LazyBitMapName }
3535import Names .TermName
3636import Annotations .Annotation
3737import Names .Name
@@ -131,8 +131,12 @@ object DottyBackendInterface {
131131
132132 def isStaticConstructor (using Context ): Boolean = (sym.isStaticMember && sym.isClassConstructor) || (sym.name eq nme.STATIC_CONSTRUCTOR )
133133
134+ /** Fields of static modules will be static at backend */
135+ def isStaticModuleField (using Context ): Boolean =
136+ sym.owner.isStaticModuleClass && sym.isField && ! sym.name.is(LazyBitMapName )
137+
134138 def isStaticMember (using Context ): Boolean = (sym ne NoSymbol ) &&
135- (sym.is(JavaStatic ) || sym.isScalaStatic)
139+ (sym.is(JavaStatic ) || sym.isScalaStatic || sym.isStaticModuleField )
136140 // guard against no sumbol cause this code is executed to select which call type(static\dynamic) to use to call array.clone
137141
138142 /**
You can’t perform that action at this time.
0 commit comments