File tree 1 file changed +6
-2
lines changed
compiler/src/dotty/tools/backend/jvm
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ import tpd._
31
31
32
32
import scala .tools .asm
33
33
import StdNames .{nme , str }
34
- import NameKinds .{DefaultGetterName , ExpandedName }
34
+ import NameKinds .{DefaultGetterName , ExpandedName , LazyBitMapName }
35
35
import Names .TermName
36
36
import Annotations .Annotation
37
37
import Names .Name
@@ -131,8 +131,12 @@ object DottyBackendInterface {
131
131
132
132
def isStaticConstructor (using Context ): Boolean = (sym.isStaticMember && sym.isClassConstructor) || (sym.name eq nme.STATIC_CONSTRUCTOR )
133
133
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
+
134
138
def isStaticMember (using Context ): Boolean = (sym ne NoSymbol ) &&
135
- (sym.is(JavaStatic ) || sym.isScalaStatic)
139
+ (sym.is(JavaStatic ) || sym.isScalaStatic || sym.isStaticModuleField )
136
140
// guard against no sumbol cause this code is executed to select which call type(static\dynamic) to use to call array.clone
137
141
138
142
/**
You can’t perform that action at this time.
0 commit comments