@@ -15,7 +15,7 @@ import dotty.tools.dotc.core.Annotations.Annotation
1515import dotty .tools .dotc .core .Constants ._
1616import dotty .tools .dotc .core .Contexts .Context
1717import dotty .tools .dotc .core .Decorators ._
18- import dotty .tools .dotc .core .Flags
18+ import dotty .tools .dotc .core .Flags . _
1919import dotty .tools .dotc .core .Names .Name
2020import dotty .tools .dotc .core .NameKinds .ExpandedName
2121import dotty .tools .dotc .core .Signature
@@ -225,7 +225,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
225225 // If the `sym` is a java module class, we use the java class instead. This ensures that we
226226 // register the class (instead of the module class) in innerClassBufferASM.
227227 // The two symbols have the same name, so the resulting internalName is the same.
228- val classSym = if (sym.is(Flags . JavaDefined ) && sym.is(Flags . ModuleClass )) sym.linkedClass else sym
228+ val classSym = if (sym.is(JavaDefined ) && sym.is(ModuleClass )) sym.linkedClass else sym
229229 getClassBTypeAndRegisterInnerClass(classSym).internalName
230230 }
231231
@@ -269,7 +269,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
269269 * must-single-thread
270270 */
271271 final def asmMethodType (msym : Symbol ): MethodBType = {
272- assert(msym.is(Flags . Method ), s " not a method-symbol: $msym" )
272+ assert(msym.is(Method ), s " not a method-symbol: $msym" )
273273 val resT : BType =
274274 if (msym.isClassConstructor || msym.isConstructor) UNIT
275275 else toTypeKind(msym.info.resultType)
@@ -343,7 +343,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
343343
344344
345345 private def shouldEmitAnnotation (annot : Annotation ): Boolean = {
346- annot.symbol.is(Flags . JavaDefined ) &&
346+ annot.symbol.is(JavaDefined ) &&
347347 retentionPolicyOf(annot) != AnnotationRetentionSourceAttr
348348 }
349349
@@ -378,7 +378,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
378378 av.visit(name, typeToTypeKind(t.args.head.tpe.classSymbol.denot.info)(bcodeStore)(innerClasesStore).toASMType)
379379 case Ident (nme.WILDCARD ) =>
380380 // An underscore argument indicates that we want to use the default value for this parameter, so do not emit anything
381- case t : tpd.RefTree if t.symbol.denot.owner.isAllOf(Flags . JavaEnumTrait ) =>
381+ case t : tpd.RefTree if t.symbol.denot.owner.isAllOf(JavaEnumTrait ) =>
382382 val edesc = innerClasesStore.typeDescriptor(t.tpe) // the class descriptor of the enumeration class.
383383 val evalue = t.symbol.javaSimpleName // value the actual enumeration value.
384384 av.visitEnum(name, edesc, evalue)
@@ -482,7 +482,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
482482 def getGenericSignature (sym : Symbol , owner : Symbol ): String = {
483483 ctx.atPhase(ctx.erasurePhase) {
484484 val memberTpe =
485- if (sym.is(Flags . Method )) sym.denot.info
485+ if (sym.is(Method )) sym.denot.info
486486 else owner.denot.thisType.memberInfo(sym)
487487 getGenericSignatureHelper(sym, owner, memberTpe).orNull
488488 }
@@ -509,7 +509,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
509509 // TODO: evaluate the other flags we might be dropping on the floor here.
510510 // TODO: ACC_SYNTHETIC ?
511511 val flags = GenBCodeOps .PublicStatic | (
512- if (m.is(Flags . JavaVarargs )) asm.Opcodes .ACC_VARARGS else 0
512+ if (m.is(JavaVarargs )) asm.Opcodes .ACC_VARARGS else 0
513513 )
514514
515515 // TODO needed? for(ann <- m.annotations) { ann.symbol.initialize }
@@ -563,7 +563,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
563563 * must-single-thread
564564 */
565565 def addForwarders (jclass : asm.ClassVisitor , jclassName : String , moduleClass : Symbol ): Unit = {
566- assert(moduleClass.is(Flags . ModuleClass ), moduleClass)
566+ assert(moduleClass.is(ModuleClass ), moduleClass)
567567 ctx.debuglog(s " Dumping mirror class for object: $moduleClass" )
568568
569569 val linkedClass = moduleClass.companionClass
@@ -572,11 +572,11 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
572572 }
573573 ctx.debuglog(s " Potentially conflicting names for forwarders: $conflictingNames" )
574574
575- for (m0 <- sortedMembersBasedOnFlags(moduleClass.info, required = Flags . Method , excluded = Flags . ExcludedForwarder )) {
576- val m = if (m0.is(Flags . Bridge )) m0.nextOverriddenSymbol else m0
575+ for (m0 <- sortedMembersBasedOnFlags(moduleClass.info, required = Method , excluded = ExcludedForwarder )) {
576+ val m = if (m0.is(Bridge )) m0.nextOverriddenSymbol else m0
577577 if (m == NoSymbol )
578578 ctx.log(s " $m0 is a bridge method that overrides nothing, something went wrong in a previous phase. " )
579- else if (m.isType || m.is(Flags . Deferred ) || (m.owner eq defn.ObjectClass ) || m.isConstructor || m.name.is(ExpandedName ))
579+ else if (m.isType || m.is(Deferred ) || (m.owner eq defn.ObjectClass ) || m.isConstructor || m.name.is(ExpandedName ))
580580 ctx.debuglog(s " No forwarder for ' $m' from $jclassName to ' $moduleClass' " )
581581 else if (conflictingNames(m.name))
582582 ctx.log(s " No forwarder for $m due to conflict with ${linkedClass.info.member(m.name)}" )
@@ -592,7 +592,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
592592 /** The members of this type that have all of `required` flags but none of `excluded` flags set.
593593 * The members are sorted by name and signature to guarantee a stable ordering.
594594 */
595- private def sortedMembersBasedOnFlags (tp : Type , required : Flags . Flag , excluded : Flags . FlagSet ): List [Symbol ] = {
595+ private def sortedMembersBasedOnFlags (tp : Type , required : Flag , excluded : FlagSet ): List [Symbol ] = {
596596 // The output of `memberNames` is a Set, sort it to guarantee a stable ordering.
597597 val names = tp.memberNames(takeAllFilter).toSeq.sorted
598598 val buffer = mutable.ListBuffer [Symbol ]()
@@ -667,7 +667,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
667667 * must-single-thread
668668 */
669669 def genMirrorClass (moduleClass : Symbol , cunit : CompilationUnit ): asm.tree.ClassNode = {
670- assert(moduleClass.is(Flags . ModuleClass ))
670+ assert(moduleClass.is(ModuleClass ))
671671 assert(moduleClass.companionClass == NoSymbol , moduleClass)
672672 innerClassBufferASM.clear()
673673 this .cunit = cunit
@@ -690,7 +690,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
690690 null /* SourceDebugExtension */ )
691691 }
692692
693- val ssa = None // getAnnotPickle(mirrorName, if (moduleClass.is(Flags. Module)) moduleClass.companionClass else moduleClass.companionModule)
693+ val ssa = None // getAnnotPickle(mirrorName, if (moduleClass.is(Module)) moduleClass.companionClass else moduleClass.companionModule)
694694 mirrorClass.visitAttribute(if (ssa.isDefined) pickleMarkerLocal else pickleMarkerForeign)
695695 emitAnnotations(mirrorClass, moduleClass.annotations ++ ssa)
696696
@@ -892,7 +892,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
892892 }
893893
894894 wrap {
895- if (sym.is(Flags . Method )) {
895+ if (sym.is(Method )) {
896896 CheckClassAdapter .checkMethodSignature(sig)
897897 }
898898 else if (sym.isTerm) {
@@ -914,9 +914,9 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
914914 // generic information could disappear as a consequence of a seemingly
915915 // unrelated change.
916916 ctx.base.settings.YnoGenericSig .value
917- || sym.is(Flags . Artifact )
918- || sym.isAllOf(Flags . LiftedMethod )
919- || sym.is(Flags . Bridge )
917+ || sym.is(Artifact )
918+ || sym.isAllOf(LiftedMethod )
919+ || sym.is(Bridge )
920920 )
921921
922922 private def getStaticForwarderGenericSignature (sym : Symbol , moduleClass : Symbol ): String = {
0 commit comments