Skip to content

Commit 3fcfeb3

Browse files
committed
Use HasDefault instead if DefaultParamterized throughout.
1 parent 7445b09 commit 3fcfeb3

File tree

18 files changed

+76
-85
lines changed

18 files changed

+76
-85
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -268,18 +268,18 @@ object desugar {
268268
Nil
269269
}
270270

271-
def normalizedVparamss = meth1.vparamss.map(_.map(vparam =>
271+
def normalizedVparamss = meth1.vparamss.nestedMapConserve(vparam =>
272272
if vparam.rhs.isEmpty then vparam
273273
else cpy.ValDef(vparam)(rhs = EmptyTree).withMods(vparam.mods | HasDefault)
274-
))
274+
)
275275

276276
def defaultGetters(vparamss: List[List[ValDef]], n: Int): List[DefDef] = vparamss match {
277277
case (vparam :: vparams) :: vparamss1 =>
278278
def defaultGetter: DefDef =
279279
DefDef(
280280
name = DefaultGetterName(methName, n),
281281
tparams = meth.tparams.map(tparam => dropContextBounds(toDefParam(tparam, keepAnnotations = true))),
282-
vparamss = takeUpTo(normalizedVparamss.nestedMap(toDefParam(_, keepAnnotations = true)), n),
282+
vparamss = takeUpTo(normalizedVparamss.nestedMap(toDefParam(_, keepAnnotations = true, keepDefault = false)), n),
283283
tpt = TypeTree(),
284284
rhs = vparam.rhs
285285
)
@@ -296,7 +296,6 @@ object desugar {
296296
if (defGetters.isEmpty) meth1
297297
else {
298298
val meth2 = cpy.DefDef(meth1)(vparamss = normalizedVparamss)
299-
.withMods(meth1.mods | DefaultParameterized)
300299
Thicket(meth2 :: defGetters)
301300
}
302301
}
@@ -388,10 +387,11 @@ object desugar {
388387
if (!keepAnnotations) mods = mods.withAnnotations(Nil)
389388
tparam.withMods(mods & EmptyFlags | Param)
390389
}
391-
private def toDefParam(vparam: ValDef, keepAnnotations: Boolean): ValDef = {
390+
private def toDefParam(vparam: ValDef, keepAnnotations: Boolean, keepDefault: Boolean): ValDef = {
392391
var mods = vparam.rawMods
393392
if (!keepAnnotations) mods = mods.withAnnotations(Nil)
394-
vparam.withMods(mods & (GivenOrImplicit | Erased) | Param)
393+
val hasDefault = if keepDefault then HasDefault else EmptyFlags
394+
vparam.withMods(mods & (GivenOrImplicit | Erased | hasDefault) | Param)
395395
}
396396

397397
/** The expansion of a class definition. See inline comments for what is involved */
@@ -465,7 +465,7 @@ object desugar {
465465
ctx.error(CaseClassMissingNonImplicitParamList(cdef), namePos)
466466
ListOfNil
467467
}
468-
else originalVparamss.nestedMap(toDefParam(_, keepAnnotations = false))
468+
else originalVparamss.nestedMap(toDefParam(_, keepAnnotations = false, keepDefault = true))
469469
val constr = cpy.DefDef(constr1)(tparams = constrTparams, vparamss = constrVparamss)
470470

471471
val (normalizedBody, enumCases, enumCompanionRef) = {
@@ -477,7 +477,7 @@ object desugar {
477477
defDef(
478478
addEvidenceParams(
479479
cpy.DefDef(ddef)(tparams = constrTparams ++ ddef.tparams),
480-
evidenceParams(constr1).map(toDefParam(_, keepAnnotations = false)))))
480+
evidenceParams(constr1).map(toDefParam(_, keepAnnotations = false, keepDefault = false)))))
481481
case stat =>
482482
stat
483483
}
@@ -709,7 +709,7 @@ object desugar {
709709
val applyMeths =
710710
if (mods.is(Abstract)) Nil
711711
else {
712-
val copiedFlagsMask = DefaultParameterized | (copiedAccessFlags & Private)
712+
val copiedFlagsMask = copiedAccessFlags & Private
713713
val appMods = {
714714
val mods = Modifiers(Synthetic | constr1.mods.flags & copiedFlagsMask)
715715
if (restrictedAccess) mods.withPrivateWithin(constr1.mods.privateWithin)

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,7 @@ object Flags {
299299
val (SuperParamAliasOrScala2x @ _, SuperParamAlias @ _, Scala2x @ _) = newFlags(26, "<super-param-alias>", "<scala-2.x>")
300300

301301
/** A method that has default params */
302-
val (_, HasDefault @ _, _) = newFlags(27, "<defaultparam>")
303-
val DefaultParameterized = HasDefault // for now
302+
val (_, HasDefault @ _, _) = newFlags(27, "<hasdefault>")
304303

305304
/** An extension method, or a collective extension instance */
306305
val (_, Extension @ _, _) = newFlags(28, "<extension>")
@@ -392,18 +391,18 @@ object Flags {
392391

393392
/** Translation of Scala2's EXPANDEDNAME flag. This flag is never stored in
394393
* symbols, is only used locally when reading the flags of a Scala2 symbol.
395-
* It's therefore safe to share the code with `InheritedDefaultParams` because
394+
* It's therefore safe to share the code with `HasDefaultParams` because
396395
* the latter is never present in Scala2 unpickle info.
397396
* /
398-
* A method that is known to have inherited default parameters
397+
* A method that is known to have (defined or inherited) default parameters
399398
*/
400-
val (Scala2ExpandedName @ _, InheritedDefaultParams @ _, _) = newFlags(59, "<inherited-default-param>")
399+
val (Scala2ExpandedName @ _, HasDefaultParams @ _, _) = newFlags(59, "<has-default-params>")
401400

402401
/** A method that is known to have no default parameters
403402
* /
404403
* A type symbol with provisional empty bounds
405404
*/
406-
val (_, NoDefaultParams @ _, Provisional @ _) = newFlags(60, "<no-default-param>", "<provisional>")
405+
val (_, NoDefaultParams @ _, Provisional @ _) = newFlags(60, "<no-default-params>", "<provisional>")
407406

408407
/** A denotation that is valid in all run-ids */
409408
val (Permanent @ _, _, _) = newFlags(61, "<permanent>")
@@ -526,8 +525,7 @@ object Flags {
526525
val EnumCase: FlagSet = Case | Enum
527526
val CovariantLocal: FlagSet = Covariant | Local // A covariant type parameter
528527
val ContravariantLocal: FlagSet = Contravariant | Local // A contravariant type parameter
529-
val HasDefaultParamsFlags: FlagSet = DefaultParameterized | InheritedDefaultParams // Has defined or inherited default parameters
530-
val DefaultParameter: FlagSet = DefaultParameterized | Param // A Scala 2x default parameter
528+
val DefaultParameter: FlagSet = HasDefault | Param // A Scala 2x default parameter
531529
val DeferredOrLazy: FlagSet = Deferred | Lazy
532530
val DeferredOrLazyOrMethod: FlagSet = Deferred | Lazy | Method
533531
val DeferredOrTermParamOrAccessor: FlagSet = Deferred | ParamAccessor | TermParam // term symbols without right-hand sides

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

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,10 @@ object SymDenotations {
417417
val allParamss =
418418
if rawParamss.isEmpty then recurWithoutParamss(info)
419419
else recurWithParamss(info, rawParamss)
420-
info match
421-
case info: PolyType => (allParamss.head, allParamss.tail).asInstanceOf
422-
case _ => (Nil, allParamss).asInstanceOf
420+
val result = info match
421+
case info: PolyType => (allParamss.head, allParamss.tail)
422+
case _ => (Nil, allParamss)
423+
result.asInstanceOf[(List[TypeSymbol], List[List[TermSymbol]])]
423424
catch case NonFatal(ex) =>
424425
println(i"paramSymss failure for $symbol, $info, $rawParamss")
425426
throw ex
@@ -969,15 +970,19 @@ object SymDenotations {
969970
def isAsConcrete(that: Symbol)(implicit ctx: Context): Boolean =
970971
!this.is(Deferred) || that.is(Deferred)
971972

972-
/** Does this symbol have defined or inherited default parameters? */
973+
/** Does this symbol have defined or inherited default parameters?
974+
* Default parameters are recognized until erasure.
975+
*/
973976
def hasDefaultParams(implicit ctx: Context): Boolean =
974-
if (this.isOneOf(HasDefaultParamsFlags)) true
975-
else if (this.is(NoDefaultParams)) false
976-
else {
977-
val result = allOverriddenSymbols exists (_.hasDefaultParams)
978-
setFlag(if (result) InheritedDefaultParams else NoDefaultParams)
977+
if ctx.erasedTypes then false
978+
else if is(HasDefaultParams) then true
979+
else if is(NoDefaultParams) then false
980+
else
981+
val result =
982+
rawParamss.exists(_.exists(_.is(HasDefault)))
983+
|| allOverriddenSymbols.exists(_.hasDefaultParams)
984+
setFlag(if result then HasDefaultParams else NoDefaultParams)
979985
result
980-
}
981986

982987
/** Symbol is an owner that would be skipped by effectiveOwner. Skipped are
983988
* - package objects

compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ class TreePickler(pickler: TastyPickler) {
678678
if (flags.is(Mutable)) writeModTag(MUTABLE)
679679
if (flags.is(Accessor)) writeModTag(FIELDaccessor)
680680
if (flags.is(CaseAccessor)) writeModTag(CASEaccessor)
681-
if (flags.is(DefaultParameterized)) writeModTag(DEFAULTparameterized)
681+
if (flags.is(HasDefault)) writeModTag(HASDEFAULT)
682682
if (flags.is(StableRealizable)) writeModTag(STABLE)
683683
if (flags.is(Extension)) writeModTag(EXTENSION)
684684
if (flags.is(ParamAccessor)) writeModTag(PARAMsetter)

compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ class TreeUnpickler(reader: TastyReader,
639639
case COVARIANT => addFlag(Covariant)
640640
case CONTRAVARIANT => addFlag(Contravariant)
641641
case SCALA2X => addFlag(Scala2x)
642-
case DEFAULTparameterized => addFlag(DefaultParameterized)
642+
case HASDEFAULT => addFlag(HasDefault)
643643
case STABLE => addFlag(StableRealizable)
644644
case EXTENSION => addFlag(Extension)
645645
case GIVEN => addFlag(Given)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ object PickleBuffer {
223223
STABLE -> StableRealizable,
224224
STATIC -> JavaStatic,
225225
CASEACCESSOR -> CaseAccessor,
226-
DEFAULTPARAM -> (DefaultParameterized, Trait),
226+
DEFAULTPARAM -> (HasDefault, Trait),
227227
BRIDGE -> Bridge,
228228
ACCESSOR -> Accessor,
229229
SUPERACCESSOR -> Scala2SuperAccessor,

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

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
176176
/** A map from symbols to their associated `decls` scopes */
177177
private val symScopes = mutable.AnyRefMap[Symbol, Scope]()
178178

179-
/** A dummy buffer to pass to `readType` when no `rawParamss` are collected */
180-
private val throwAwayBuffer = new ListBuffer[List[Symbol]]
179+
/** A mapping from method types to the parameters used in constructing them */
180+
private val paramsOfMethodType = new java.util.IdentityHashMap[MethodType, List[Symbol]]
181181

182182
protected def errorBadSignature(msg: String, original: Option[RuntimeException] = None)(implicit ctx: Context): Nothing = {
183183
val ex = new BadSignature(
@@ -452,12 +452,6 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
452452
val owner = readSymbolRef()
453453

454454
var flags = unpickleScalaFlags(readLongNat(), name.isTypeName)
455-
if (flags.isAllOf(DefaultParameter)) {
456-
// DefaultParameterized flag now on method, not parameter
457-
//assert(flags.is(Param), s"$name0 in $owner")
458-
flags = flags &~ DefaultParameterized
459-
owner.setFlag(DefaultParameterized)
460-
}
461455

462456
name = name.adjustIfModuleClass(flags)
463457
if (flags.is(Method))
@@ -564,6 +558,15 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
564558

565559
class LocalUnpickler extends LazyType {
566560
def startCoord(denot: SymDenotation): Coord = denot.symbol.coord
561+
562+
def paramssOfType(tp: Type): List[List[Symbol]] = tp match
563+
case TempPolyType(tparams, restpe) => tparams :: paramssOfType(restpe)
564+
case mt: MethodType =>
565+
val params = paramsOfMethodType.remove(mt)
566+
val rest = paramssOfType(mt.resType)
567+
if params == null then rest else params :: rest
568+
case _ => Nil
569+
567570
def complete(denot: SymDenotation)(implicit ctx: Context): Unit = try {
568571
def parseToCompletion(denot: SymDenotation)(implicit ctx: Context) = {
569572
val tag = readByte()
@@ -577,11 +580,8 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
577580
if (isSymbolRef(inforef)) inforef = readNat()
578581

579582
// println("reading type for " + denot) // !!! DEBUG
580-
val paramssBuf =
581-
if denot.is(Method) then new ListBuffer[List[Symbol]]
582-
else throwAwayBuffer
583-
val tp = at(inforef, () => readType(paramssBuf)(ctx))
584-
if denot.is(Method) then denot.rawParamss = paramssBuf.toList
583+
val tp = at(inforef, () => readType()(ctx))
584+
if denot.is(Method) then denot.rawParamss = paramssOfType(tp)
585585

586586
denot match {
587587
case denot: ClassDenotation if !isRefinementClass(denot.symbol) =>
@@ -728,7 +728,7 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
728728
* the flag say that a type of kind * is expected, so that PolyType(tps, restpe) can be disambiguated to PolyType(tps, NullaryMethodType(restpe))
729729
* (if restpe is not a ClassInfoType, a MethodType or a NullaryMethodType, which leaves TypeRef/SingletonType -- the latter would make the polytype a type constructor)
730730
*/
731-
protected def readType(paramssBuf: ListBuffer[List[Symbol]])(implicit ctx: Context): Type = {
731+
protected def readType()(implicit ctx: Context): Type = {
732732
val tag = readByte()
733733
val end = readNat() + readIndex
734734
(tag: @switch) match {
@@ -797,15 +797,15 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
797797
case METHODtpe | IMPLICITMETHODtpe =>
798798
val restpe = readTypeRef()
799799
val params = until(end, () => readSymbolRef())
800-
if params.nonEmpty then paramssBuf += params
801800
val maker = MethodType.companion(
802801
isImplicit = tag == IMPLICITMETHODtpe || params.nonEmpty && params.head.is(Implicit))
803-
maker.fromSymbols(params, restpe)
802+
val result = maker.fromSymbols(params, restpe)
803+
if params.nonEmpty then paramsOfMethodType.put(result, params)
804+
result
804805
case POLYtpe =>
805806
val restpe = readTypeRef()
806807
val typeParams = until(end, () => readSymbolRef())
807808
if typeParams.nonEmpty then
808-
paramssBuf += typeParams
809809
TempPolyType(typeParams.asInstanceOf[List[TypeSymbol]], restpe.widenExpr)
810810
else
811811
ExprType(restpe)
@@ -892,7 +892,7 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
892892
at(readNat(), () => readDisambiguatedSymbol(p)())
893893

894894
protected def readNameRef()(implicit ctx: Context): Name = at(readNat(), () => readName())
895-
protected def readTypeRef()(implicit ctx: Context): Type = at(readNat(), () => readType(throwAwayBuffer)) // after the NMT_TRANSITION period, we can leave off the () => ... ()
895+
protected def readTypeRef()(implicit ctx: Context): Type = at(readNat(), () => readType()) // after the NMT_TRANSITION period, we can leave off the () => ... ()
896896
protected def readConstantRef()(implicit ctx: Context): Constant = at(readNat(), () => readConstant())
897897

898898
protected def readTypeNameRef()(implicit ctx: Context): TypeName = readNameRef().toTypeName

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

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -337,28 +337,17 @@ private class ExtractAPICollector(implicit val ctx: Context) extends ThunkHolder
337337
}
338338

339339
def apiDef(sym: TermSymbol): api.Def = {
340-
def paramLists(t: Type, start: Int = 0): List[api.ParameterList] = t match {
340+
def paramLists(t: Type, paramss: List[List[Symbol]]): List[api.ParameterList] = t match {
341341
case pt: TypeLambda =>
342-
assert(start == 0)
343-
paramLists(pt.resultType)
342+
paramLists(pt.resultType, paramss)
344343
case mt @ MethodTpe(pnames, ptypes, restpe) =>
345-
// TODO: We shouldn't have to work so hard to find the default parameters
346-
// of a method, Dotty should expose a convenience method for that, see #1143
347-
val defaults =
348-
if (sym.is(DefaultParameterized)) {
349-
val qual =
350-
if (sym.isClassConstructor)
351-
sym.owner.companionModule // default getters for class constructors are found in the companion object
352-
else
353-
sym.owner
354-
pnames.indices.map(i =>
355-
qual.info.member(DefaultGetterName(sym.name, start + i)).exists)
356-
} else
357-
pnames.indices.map(Function.const(false))
358-
val params = pnames.lazyZip(ptypes).lazyZip(defaults).map((pname, ptype, isDefault) =>
359-
api.MethodParameter.of(pname.toString, apiType(ptype),
360-
isDefault, api.ParameterModifier.Plain))
361-
api.ParameterList.of(params.toArray, mt.isImplicitMethod) :: paramLists(restpe, params.length)
344+
assert(paramss.nonEmpty && paramss.head.hasSameLengthAs(pnames),
345+
i"mismatch for $sym, ${sym.info}, ${sym.paramSymss}")
346+
val apiParams = paramss.head.lazyZip(ptypes).map((param, ptype) =>
347+
api.MethodParameter.of(param.name.toString, apiType(ptype),
348+
param.is(HasDefault), api.ParameterModifier.Plain))
349+
api.ParameterList.of(apiParams.toArray, mt.isImplicitMethod)
350+
:: paramLists(restpe, paramss.tail)
362351
case _ =>
363352
Nil
364353
}
@@ -370,7 +359,7 @@ private class ExtractAPICollector(implicit val ctx: Context) extends ThunkHolder
370359
case _ =>
371360
Nil
372361
}
373-
val vparamss = paramLists(sym.info)
362+
val vparamss = paramLists(sym.info, sym.paramSymss._2)
374363
val retTp = sym.info.finalResultType.widenExpr
375364

376365
api.Def.of(sym.name.toString, apiAccess(sym), apiModifiers(sym),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1852,7 +1852,7 @@ class ReflectionCompilerInterface(val rootContext: core.Contexts.Context) extend
18521852
def Flags_Covariant: Flags = core.Flags.Covariant
18531853
def Flags_Contravariant: Flags = core.Flags.Contravariant
18541854
def Flags_Scala2X: Flags = core.Flags.Scala2x
1855-
def Flags_DefaultParameterized: Flags = core.Flags.DefaultParameterized
1855+
def Flags_HasDefault: Flags = core.Flags.HasDefault
18561856
def Flags_StableRealizable: Flags = core.Flags.StableRealizable
18571857
def Flags_Param: Flags = core.Flags.Param
18581858
def Flags_ParamAccessor: Flags = core.Flags.ParamAccessor

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class Erasure extends Phase with DenotTransformer {
8282
val oldFlags = ref.flags
8383
var newFlags =
8484
if (oldSymbol.is(Flags.TermParam) && isCompacted(oldSymbol.owner)) oldFlags &~ Flags.Param
85-
else oldFlags &~ Flags.HasDefaultParamsFlags // HasDefaultParamsFlags needs to be dropped because overriding might become overloading
85+
else oldFlags
8686
val oldAnnotations = ref.annotations
8787
var newAnnotations = oldAnnotations
8888
if oldSymbol.isRetainedInlineMethod then

compiler/src/dotty/tools/dotc/typer/Checking.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -894,10 +894,9 @@ trait Checking {
894894
if (decl is Synthetic) doubleDefError(other, decl)
895895
else doubleDefError(decl, other)
896896
}
897-
if (decl.isOneOf(HasDefaultParamsFlags) && other.isOneOf(HasDefaultParamsFlags)) {
897+
if decl.hasDefaultParams && other.hasDefaultParams then
898898
ctx.error(em"two or more overloaded variants of $decl have default arguments", decl.sourcePos)
899-
decl.resetFlag(HasDefaultParamsFlags)
900-
}
899+
decl.resetFlag(HasDefaultParams)
901900
}
902901
if (!excludeFromDoubleDeclCheck(decl))
903902
seen(decl.name) = decl :: seen(decl.name)

library/src/scala/tasty/Reflection.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2635,8 +2635,8 @@ class Reflection(private[scala] val internal: CompilerInterface) { self =>
26352635
/** Was this symbol imported from Scala2.x */
26362636
def Scala2X: Flags = internal.Flags_Scala2X
26372637

2638-
/** Is this symbol a method with default parameters */
2639-
def DefaultParameterized: Flags = internal.Flags_DefaultParameterized
2638+
/** Is this symbol a parameter with a default value? */
2639+
def HasDefault: Flags = internal.Flags_HasDefault
26402640

26412641
/** Is this symbol member that is assumed to be stable and realizable */
26422642
def StableRealizable: Flags = internal.Flags_StableRealizable

library/src/scala/tasty/reflect/CompilerInterface.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1400,7 +1400,7 @@ trait CompilerInterface {
14001400
def Flags_Covariant: Flags
14011401
def Flags_Contravariant: Flags
14021402
def Flags_Scala2X: Flags
1403-
def Flags_DefaultParameterized: Flags
1403+
def Flags_HasDefault: Flags
14041404
def Flags_StableRealizable: Flags
14051405
def Flags_Param: Flags
14061406
def Flags_ParamAccessor: Flags

library/src/scala/tasty/reflect/ExtractorsPrinter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class ExtractorsPrinter[R <: Reflection & Singleton](val tasty: R) extends Print
4343
if (flags.is(Flags.Covariant)) flagList += "Flags.Covariant"
4444
if (flags.is(Flags.Contravariant)) flagList += "Flags.Contravariant"
4545
if (flags.is(Flags.Scala2X)) flagList += "Flags.Scala2X"
46-
if (flags.is(Flags.DefaultParameterized)) flagList += "Flags.DefaultParameterized"
46+
if (flags.is(Flags.HasDefault)) flagList += "Flags.HasDefault"
4747
if (flags.is(Flags.StableRealizable)) flagList += "Flags.StableRealizable"
4848
if (flags.is(Flags.Param)) flagList += "Flags.Param"
4949
if (flags.is(Flags.ParamAccessor)) flagList += "Flags.ParamAccessor"

0 commit comments

Comments
 (0)