Skip to content

Commit 082fc61

Browse files
committed
Rename isAll -> isAllOf
Also rename SymDenotaton.is(_, _) to isAllOf
1 parent f95a8c1 commit 082fc61

40 files changed

+68
-68
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
256256
case t: TypeApply if (t.fun.symbol == Predef_classOf) =>
257257
av.visit(name, t.args.head.tpe.classSymbol.denot.info.toTypeKind(bcodeStore)(innerClasesStore).toASMType)
258258
case t: tpd.RefTree =>
259-
if (t.symbol.denot.owner.isAll(Flags.JavaEnum)) {
259+
if (t.symbol.denot.owner.isAllOf(Flags.JavaEnum)) {
260260
val edesc = innerClasesStore.typeDescriptor(t.tpe.asInstanceOf[bcodeStore.int.Type]) // the class descriptor of the enumeration class.
261261
val evalue = t.symbol.name.mangledString // value the actual enumeration value.
262262
av.visitEnum(name, edesc, evalue)
@@ -477,7 +477,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
477477
// unrelated change.
478478
ctx.base.settings.YnoGenericSig.value
479479
|| sym.is(Flags.Artifact)
480-
|| sym.isAll(Flags.LiftedMethod)
480+
|| sym.isAllOf(Flags.LiftedMethod)
481481
|| sym.is(Flags.Bridge)
482482
)
483483

@@ -689,13 +689,13 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
689689
def isBottomClass: Boolean = (sym ne defn.NullClass) && (sym ne defn.NothingClass)
690690
def isBridge: Boolean = sym.is(Flags.Bridge)
691691
def isArtifact: Boolean = sym.is(Flags.Artifact)
692-
def hasEnumFlag: Boolean = sym.isAll(Flags.JavaEnum)
692+
def hasEnumFlag: Boolean = sym.isAllOf(Flags.JavaEnum)
693693
def hasAccessBoundary: Boolean = sym.accessBoundary(defn.RootClass) ne defn.RootClass
694694
def isVarargsMethod: Boolean = sym.is(Flags.JavaVarargs)
695695
def isDeprecated: Boolean = false
696696
def isMutable: Boolean = sym.is(Flags.Mutable)
697697
def hasAbstractFlag: Boolean =
698-
(sym.is(Flags.Abstract)) || (sym.isAll(Flags.JavaInterface)) || (sym.is(Flags.Trait))
698+
(sym.is(Flags.Abstract)) || (sym.isAllOf(Flags.JavaInterface)) || (sym.is(Flags.Trait))
699699
def hasModuleFlag: Boolean = sym.is(Flags.Module)
700700
def isSynchronized: Boolean = sym.is(Flags.Synchronized)
701701
def isNonBottomSubClass(other: Symbol): Boolean = sym.derivesFrom(other)

compiler/src/dotty/tools/dotc/ast/Desugar.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ object desugar {
159159
val vdef @ ValDef(name, tpt, rhs) = transformQuotedPatternName(vdef0)
160160
val mods = vdef.mods
161161
val setterNeeded =
162-
mods.is(Mutable) && ctx.owner.isClass && (!mods.isAll(PrivateLocal) || ctx.owner.is(Trait))
162+
mods.is(Mutable) && ctx.owner.isClass && (!mods.isAllOf(PrivateLocal) || ctx.owner.is(Trait))
163163
if (setterNeeded) {
164164
// TODO: copy of vdef as getter needed?
165165
// val getter = ValDef(mods, name, tpt, rhs) withPos vdef.pos?

compiler/src/dotty/tools/dotc/ast/untpd.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
187187
def is(fs: FlagSet, butNot: FlagSet): Boolean = flags.is(fs, butNot = butNot)
188188
def isOneOf(fs: FlagSet): Boolean = flags.isOneOf(fs)
189189
def isOneOf(fs: FlagSet, butNot: FlagSet): Boolean = flags.isOneOf(fs, butNot = butNot)
190-
def isAll(fc: FlagConjunction): Boolean = flags.isAll(fc)
190+
def isAllOf(fc: FlagConjunction): Boolean = flags.isAllOf(fc)
191191

192192
def | (fs: FlagSet): Modifiers = withFlags(flags | fs)
193193
def & (fs: FlagSet): Modifiers = withFlags(flags & fs)
@@ -217,7 +217,7 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
217217
else {
218218
if (ms.nonEmpty)
219219
for (m <- ms)
220-
assert(flags.isAll(allOf(m.flags)) ||
220+
assert(flags.isAllOf(allOf(m.flags)) ||
221221
m.isInstanceOf[Mod.Private] && !privateWithin.isEmpty,
222222
s"unaccounted modifier: $m in $this when adding $ms")
223223
copy(mods = ms)

compiler/src/dotty/tools/dotc/config/JavaPlatform.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class JavaPlatform extends Platform {
3939

4040
/** Is the SAMType `cls` also a SAM under the rules of the JVM? */
4141
def isSam(cls: ClassSymbol)(implicit ctx: Context): Boolean =
42-
cls.isAll(NoInitsTrait) &&
42+
cls.isAllOf(NoInitsTrait) &&
4343
cls.superClass == defn.ObjectClass &&
4444
cls.directlyInheritedTraits.forall(_.is(NoInits)) &&
4545
!ExplicitOuter.needsOuterIfReferenced(cls) &&

compiler/src/dotty/tools/dotc/core/Denotations.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ object Denotations {
11291129
case symd: SymDenotation => symd
11301130
case _ => symbol.denot
11311131
}
1132-
symd.isAll(required) && !symd.isOneOf(excluded)
1132+
symd.isAllOf(required) && !symd.isOneOf(excluded)
11331133
}
11341134
}
11351135

compiler/src/dotty/tools/dotc/core/Flags.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ object Flags {
6464
/** Does this flag set have all of the flags in given flag conjunction?
6565
* Pre: The intersection of the typeflags of both sets must be non-empty.
6666
*/
67-
def isAll(flags: FlagConjunction): Boolean = {
67+
def isAllOf(flags: FlagConjunction): Boolean = {
6868
val fs = bits & flags.bits
6969
((fs & KINDFLAGS) != 0 || flags.bits == 0) &&
7070
(fs >>> TYPESHIFT) == (flags.bits >>> TYPESHIFT)
@@ -74,7 +74,7 @@ object Flags {
7474
* and at the same time contain none of the flags in the `butNot` set?
7575
* Pre: The intersection of the typeflags of both sets must be non-empty.
7676
*/
77-
def isAll(flags: FlagConjunction, butNot: FlagSet): Boolean = isAll(flags) && !is(butNot)
77+
def isAllOf(flags: FlagConjunction, butNot: FlagSet): Boolean = isAllOf(flags) && !is(butNot)
7878

7979
def isEmpty: Boolean = (bits & ~KINDFLAGS) == 0
8080

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,14 @@ object SymDenotations {
207207
(if (isCurrent(fs) && isCurrent(butNot)) myFlags else flags).isOneOf(fs, butNot)
208208

209209
/** Has this denotation all of the flags in `fs` set? */
210-
final def isAll(fs: FlagConjunction)(implicit ctx: Context): Boolean =
211-
(if (isCurrent(fs.toFlags)) myFlags else flags).isAll(fs)
210+
final def isAllOf(fs: FlagConjunction)(implicit ctx: Context): Boolean =
211+
(if (isCurrent(fs.toFlags)) myFlags else flags).isAllOf(fs)
212212

213213
/** Has this denotation all of the flags in `fs` set, whereas none of the flags
214214
* in `butNot` are set?
215215
*/
216-
final def is(fs: FlagConjunction, butNot: FlagSet)(implicit ctx: Context): Boolean =
217-
(if (isCurrent(fs.toFlags) && isCurrent(butNot)) myFlags else flags).isAll(fs, butNot)
216+
final def isAllOf(fs: FlagConjunction, butNot: FlagSet)(implicit ctx: Context): Boolean =
217+
(if (isCurrent(fs.toFlags) && isCurrent(butNot)) myFlags else flags).isAllOf(fs, butNot)
218218

219219
/** The type info, or, if symbol is not yet completed, the completer */
220220
final def infoOrCompleter: Type = myInfo
@@ -848,7 +848,7 @@ object SymDenotations {
848848
def isSkolem: Boolean = name == nme.SKOLEM
849849

850850
def isInlineMethod(implicit ctx: Context): Boolean =
851-
is(InlineMethod, butNot = Accessor) &&
851+
isAllOf(InlineMethod, butNot = Accessor) &&
852852
!name.isUnapplyName // unapply methods do not count as inline methods
853853
// we need an inline flag on them only do that
854854
// reduceProjection gets access to their rhs
@@ -1245,7 +1245,7 @@ object SymDenotations {
12451245
final def accessBoundary(base: Symbol)(implicit ctx: Context): Symbol = {
12461246
val fs = flags
12471247
if (fs.is(Private)) owner
1248-
else if (fs.isAll(StaticProtected)) defn.RootClass
1248+
else if (fs.isAllOf(StaticProtected)) defn.RootClass
12491249
else if (privateWithin.exists && !ctx.phase.erasedTypes) privateWithin
12501250
else if (fs.is(Protected)) base
12511251
else defn.RootClass

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ object Types {
235235
* from the ThisType of `symd`'s owner.
236236
*/
237237
def isArgPrefixOf(symd: SymDenotation)(implicit ctx: Context): Boolean =
238-
symd.isAll(ClassTypeParam) && {
238+
symd.isAllOf(ClassTypeParam) && {
239239
this match {
240240
case tp: ThisType => tp.cls ne symd.owner
241241
case _ => true
@@ -2144,7 +2144,7 @@ object Types {
21442144
else {
21452145
if (isType) {
21462146
val res =
2147-
if (currentSymbol.isAll(ClassTypeParam)) argForParam(prefix)
2147+
if (currentSymbol.isAllOf(ClassTypeParam)) argForParam(prefix)
21482148
else prefix.lookupRefined(name)
21492149
if (res.exists) return res
21502150
if (Config.splitProjections)
@@ -4370,7 +4370,7 @@ object Types {
43704370
// (x: String): Int
43714371
val approxParams = new ApproximatingTypeMap {
43724372
def apply(tp: Type): Type = tp match {
4373-
case tp: TypeRef if tp.symbol.isAll(ClassTypeParam) && tp.symbol.owner == cls =>
4373+
case tp: TypeRef if tp.symbol.isAllOf(ClassTypeParam) && tp.symbol.owner == cls =>
43744374
tp.info match {
43754375
case info: AliasingBounds =>
43764376
mapOver(info.alias)
@@ -4712,7 +4712,7 @@ object Types {
47124712
else pre match {
47134713
case Range(preLo, preHi) =>
47144714
val forwarded =
4715-
if (tp.symbol.isAll(ClassTypeParam)) expandParam(tp, preHi)
4715+
if (tp.symbol.isAllOf(ClassTypeParam)) expandParam(tp, preHi)
47164716
else tryWiden(tp, preHi)
47174717
forwarded.orElse(
47184718
range(super.derivedSelect(tp, preLo).loBound, super.derivedSelect(tp, preHi).hiBound))

compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ class ClassfileParser(
583583
parseExceptions(attrLen)
584584

585585
case tpnme.CodeATTR =>
586-
if (sym.owner.isAll(Flags.JavaTrait)) {
586+
if (sym.owner.isAllOf(Flags.JavaTrait)) {
587587
sym.resetFlag(Flags.Deferred)
588588
sym.owner.resetFlag(Flags.PureInterface)
589589
ctx.log(s"$sym in ${sym.owner} is a java8+ default method.")

compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ object Scala2Unpickler {
120120
if (tsym.exists) tsym.setFlag(TypeParam)
121121
else denot.enter(tparam, decls)
122122
}
123-
if (!denot.flagsUNSAFE.isAll(JavaModule)) ensureConstructor(denot.symbol.asClass, decls)
123+
if (!denot.flagsUNSAFE.isAllOf(JavaModule)) ensureConstructor(denot.symbol.asClass, decls)
124124

125125
val scalacCompanion = denot.classSymbol.scalacLinkedClass
126126

@@ -436,7 +436,7 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
436436
val owner = readSymbolRef()
437437

438438
var flags = unpickleScalaFlags(readLongNat(), name.isTypeName)
439-
if (flags.isAll(DefaultParameter)) {
439+
if (flags.isAllOf(DefaultParameter)) {
440440
// DefaultParameterized flag now on method, not parameter
441441
//assert(flags.is(Param), s"$name0 in $owner")
442442
flags = flags &~ DefaultParameterized

compiler/src/dotty/tools/dotc/interactive/Completion.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ object Completion {
255255
!sym.isPrimaryConstructor &&
256256
sym.sourceSymbol.exists &&
257257
(!sym.is(Package) || sym.is(ModuleClass)) &&
258-
!sym.isAll(allOf(Mutable, Accessor)) &&
258+
!sym.isAllOf(allOf(Mutable, Accessor)) &&
259259
!sym.isPackageObject &&
260260
!sym.is(Artifact) &&
261261
(

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2033,7 +2033,7 @@ object Parsers {
20332033
private def normalize(mods: Modifiers): Modifiers =
20342034
if (mods.is(Private) && mods.hasPrivateWithin)
20352035
normalize(mods &~ Private)
2036-
else if (mods.isAll(AbstractAndOverride))
2036+
else if (mods.isAllOf(AbstractAndOverride))
20372037
normalize(addFlag(mods &~ (Abstract | Override), AbsOverride))
20382038
else
20392039
mods

compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
391391
/** String representation of symbol's definition keyword */
392392
protected def keyString(sym: Symbol): String = {
393393
val flags = sym.flagsUNSAFE
394-
if (flags.isAll(JavaTrait)) "interface"
394+
if (flags.isAllOf(JavaTrait)) "interface"
395395
else if (flags.is(Trait)) "trait"
396396
else if (flags.is(Module)) "object"
397397
else if (sym.isClass) "class"

compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
810810
protected def annotText(tree: untpd.Tree): Text = "@" ~ constrText(tree) // DD
811811

812812
protected def modText(mods: untpd.Modifiers, sym: Symbol, kw: String, isType: Boolean): Text = { // DD
813-
val suppressKw = if (enclDefIsClass) mods.isAll(ParamAndLocal) else mods.is(Param)
813+
val suppressKw = if (enclDefIsClass) mods.isAllOf(ParamAndLocal) else mods.is(Param)
814814
var flagMask =
815815
if (ctx.settings.YdebugFlags.value) AnyFlags
816816
else if (suppressKw) PrintableFlags(isType) &~ Private
@@ -841,7 +841,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
841841
override protected def treatAsTypeParam(sym: Symbol): Boolean = sym.is(TypeParam)
842842

843843
override protected def treatAsTypeArg(sym: Symbol): Boolean =
844-
sym.isType && (sym.isAll(ProtectedLocal)) &&
844+
sym.isType && (sym.isAllOf(ProtectedLocal)) &&
845845
(sym.allOverriddenSymbols exists (_.is(TypeParam)))
846846

847847
override def toText(sym: Symbol): Text = {

compiler/src/dotty/tools/dotc/sbt/ExtractAPI.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,9 +567,9 @@ private class ExtractAPICollector(implicit val ctx: Context) extends ThunkHolder
567567
// but their `privateWithin` exists, see `Parsers#ParserCommon#normalize`.
568568
if (!sym.isOneOf(Protected | Private) && !sym.privateWithin.exists)
569569
Constants.public
570-
else if (sym.isAll(PrivateLocal))
570+
else if (sym.isAllOf(PrivateLocal))
571571
Constants.privateLocal
572-
else if (sym.isAll(ProtectedLocal))
572+
else if (sym.isAllOf(ProtectedLocal))
573573
Constants.protectedLocal
574574
else {
575575
val qualifier =

compiler/src/dotty/tools/dotc/tastyreflect/KernelImpl.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1680,7 +1680,7 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
16801680
type Flags = core.Flags.FlagSet
16811681

16821682
/** Is the given flag set a subset of this flag sets */
1683-
def Flags_is(self: Flags)(that: Flags): Boolean = self.isAll(allOf(that))
1683+
def Flags_is(self: Flags)(that: Flags): Boolean = self.isAllOf(allOf(that))
16841684

16851685
/** Union of the two flag sets */
16861686
def Flags_or(self: Flags)(that: Flags): Flags = self | that

compiler/src/dotty/tools/dotc/transform/AugmentScala2Traits.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class AugmentScala2Traits extends MiniPhase with IdentityDenotTransformer { this
5959
if (sym.isGetter && !sym.is(LazyOrDeferred) && !sym.setter.exists &&
6060
!sym.info.resultType.isInstanceOf[ConstantType])
6161
traitSetter(sym.asTerm).enteredAfter(thisPhase)
62-
if ((sym.isAll(PrivateAccessor) && !sym.name.is(ExpandedName) &&
62+
if ((sym.isAllOf(PrivateAccessor) && !sym.name.is(ExpandedName) &&
6363
(sym.isGetter || sym.isSetter)) // strangely, Scala 2 fields are also methods that have Accessor set.
6464
|| sym.isSuperAccessor) // scala2 superaccessors are pickled as private, but are compiled as public expanded
6565
sym.ensureNotPrivate.installAfter(thisPhase)

compiler/src/dotty/tools/dotc/transform/CollectNullableFields.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class CollectNullableFields extends MiniPhase {
6464
sym.isField &&
6565
!sym.is(Lazy) &&
6666
!sym.owner.is(Trait) &&
67-
sym.initial.isAll(PrivateLocal) &&
67+
sym.initial.isAllOf(PrivateLocal) &&
6868
sym.info.widenDealias.typeSymbol.isNullableClass
6969

7070
if (isNullablePrivateField)

compiler/src/dotty/tools/dotc/transform/CompleteJavaEnums.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class CompleteJavaEnums extends MiniPhase with InfoTransformer { thisPhase =>
112112

113113
override def transformValDef(tree: ValDef)(implicit ctx: Context): ValDef = {
114114
val sym = tree.symbol
115-
if ((sym.isAll(EnumValue) || sym.name == nme.DOLLAR_VALUES) && sym.owner.linkedClass.derivesFromJavaEnum)
115+
if ((sym.isAllOf(EnumValue) || sym.name == nme.DOLLAR_VALUES) && sym.owner.linkedClass.derivesFromJavaEnum)
116116
sym.addAnnotation(Annotations.Annotation(defn.ScalaStaticAnnot))
117117
tree
118118
}
@@ -147,7 +147,7 @@ class CompleteJavaEnums extends MiniPhase with InfoTransformer { thisPhase =>
147147
parents = addEnumConstrArgs(defn.JavaEnumClass, templ.parents, addedSyms.map(ref)),
148148
body = params ++ addedDefs ++ rest)
149149
}
150-
else if (cls.isAnonymousClass && cls.owner.isAll(EnumCase) && cls.owner.owner.linkedClass.derivesFromJavaEnum) {
150+
else if (cls.isAnonymousClass && cls.owner.isAllOf(EnumCase) && cls.owner.owner.linkedClass.derivesFromJavaEnum) {
151151
def rhsOf(name: TermName) =
152152
templ.body.collect {
153153
case mdef: DefDef if mdef.name == name => mdef.rhs

compiler/src/dotty/tools/dotc/transform/Constructors.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class Constructors extends MiniPhase with IdentityDenotTransformer { thisPhase =
9999
*/
100100
override def checkPostCondition(tree: tpd.Tree)(implicit ctx: Context): Unit = {
101101
def emptyRhsOK(sym: Symbol) =
102-
sym.isOneOf(LazyOrDeferred) || sym.isConstructor && sym.owner.isAll(NoInitsTrait)
102+
sym.isOneOf(LazyOrDeferred) || sym.isConstructor && sym.owner.isAllOf(NoInitsTrait)
103103
tree match {
104104
case tree: ValDef if tree.symbol.exists && tree.symbol.owner.isClass && !tree.symbol.is(Lazy) && !tree.symbol.hasAnnotation(defn.ScalaStaticAnnot) =>
105105
assert(tree.rhs.isEmpty, i"$tree: initializer should be moved to constructors")
@@ -119,7 +119,7 @@ class Constructors extends MiniPhase with IdentityDenotTransformer { thisPhase =
119119
* constructor.
120120
*/
121121
private def mightBeDropped(sym: Symbol)(implicit ctx: Context) =
122-
sym.is(Private, butNot = MethodOrLazy) && !sym.isAll(MutableParamAccessor)
122+
sym.is(Private, butNot = MethodOrLazy) && !sym.isAllOf(MutableParamAccessor)
123123

124124
private final val MutableParamAccessor = allOf(Mutable, ParamAccessor)
125125

@@ -275,7 +275,7 @@ class Constructors extends MiniPhase with IdentityDenotTransformer { thisPhase =
275275

276276
val finalConstrStats = copyParams ::: mappedSuperCalls ::: lazyAssignments ::: stats
277277
val expandedConstr =
278-
if (cls.isAll(NoInitsTrait)) {
278+
if (cls.isAllOf(NoInitsTrait)) {
279279
assert(finalConstrStats.isEmpty)
280280
constr
281281
}

compiler/src/dotty/tools/dotc/transform/ExpandPrivate.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class ExpandPrivate extends MiniPhase with IdentityDenotTransformer { thisPhase
5858
}
5959

6060
private def isVCPrivateParamAccessor(d: SymDenotation)(implicit ctx: Context) =
61-
d.isTerm && d.isAll(PrivateParamAccessor) && isDerivedValueClass(d.owner)
61+
d.isTerm && d.isAllOf(PrivateParamAccessor) && isDerivedValueClass(d.owner)
6262

6363
/** Make private terms accessed from different classes non-private.
6464
* Note: this happens also for accesses between class and linked module class.
@@ -105,7 +105,7 @@ class ExpandPrivate extends MiniPhase with IdentityDenotTransformer { thisPhase
105105
val sym = tree.symbol
106106
tree.rhs match {
107107
case Apply(sel @ Select(_: Super, _), _)
108-
if sym.isAll(PrivateParamAccessor) && sel.symbol.is(ParamAccessor) && sym.name == sel.symbol.name =>
108+
if sym.isAllOf(PrivateParamAccessor) && sel.symbol.is(ParamAccessor) && sym.name == sel.symbol.name =>
109109
sym.ensureNotPrivate.installAfter(thisPhase)
110110
case _ =>
111111
if (isVCPrivateParamAccessor(sym))

compiler/src/dotty/tools/dotc/transform/Getters.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Getters extends MiniPhase with SymTransformer {
5454
override def transformSym(d: SymDenotation)(implicit ctx: Context): SymDenotation = {
5555
def noGetterNeeded =
5656
d.isOneOf(NoGetterNeededFlags) ||
57-
d.isAll(PrivateLocal) && !d.owner.is(Trait) && !isDerivedValueClass(d.owner) && !d.is(Lazy) ||
57+
d.isAllOf(PrivateLocal) && !d.owner.is(Trait) && !isDerivedValueClass(d.owner) && !d.is(Lazy) ||
5858
d.is(Module) && d.isStatic ||
5959
d.hasAnnotation(defn.ScalaStaticAnnot) ||
6060
d.isSelfSym

compiler/src/dotty/tools/dotc/transform/LazyVals.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class LazyVals extends MiniPhase with IdentityDenotTransformer {
7474
else {
7575
val isField = sym.owner.isClass
7676
if (isField) {
77-
if (sym.isAll(SyntheticModule))
77+
if (sym.isAllOf(SyntheticModule))
7878
transformSyntheticModule(tree)
7979
else if (sym.isThreadUnsafe) {
8080
if (sym.is(Module)) {

compiler/src/dotty/tools/dotc/transform/LinkScala2Impls.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class LinkScala2Impls extends MiniPhase with IdentityDenotTransformer { thisPhas
8888
private def implMethod(meth: Symbol)(implicit ctx: Context): Symbol = {
8989
val implName = ImplMethName(meth.name.asTermName)
9090
val cls = meth.owner
91-
if (cls.isAll(Scala2xTrait))
91+
if (cls.isAllOf(Scala2xTrait))
9292
if (meth.isConstructor)
9393
cls.info.decl(nme.TRAIT_CONSTRUCTOR).symbol
9494
else

compiler/src/dotty/tools/dotc/transform/Mixin.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,10 @@ class Mixin extends MiniPhase with SymTransformer { thisPhase =>
196196

197197
def superCallOpt(baseCls: Symbol): List[Tree] = superCalls.get(baseCls) match {
198198
case Some(call) =>
199-
if (defn.NotRuntimeClasses.contains(baseCls) || baseCls.isAll(NoInitsTrait)) Nil
199+
if (defn.NotRuntimeClasses.contains(baseCls) || baseCls.isAllOf(NoInitsTrait)) Nil
200200
else call :: Nil
201201
case None =>
202-
if (baseCls.isAll(NoInitsTrait) || defn.NoInitClasses.contains(baseCls) || defn.isFunctionClass(baseCls)) Nil
202+
if (baseCls.isAllOf(NoInitsTrait) || defn.NoInitClasses.contains(baseCls) || defn.isFunctionClass(baseCls)) Nil
203203
else {
204204
//println(i"synth super call ${baseCls.primaryConstructor}: ${baseCls.primaryConstructor.info}")
205205
transformFollowingDeep(superRef(baseCls.primaryConstructor).appliedToNone) :: Nil

0 commit comments

Comments
 (0)