@@ -1328,7 +1328,7 @@ object Types {
1328
1328
case tp : AndType =>
1329
1329
tp.derivedAndType(tp.tp1.widenUnionWithoutNull, tp.tp2.widenUnionWithoutNull)
1330
1330
case tp : RefinedType =>
1331
- tp.derivedRefinedType(tp. parent.widenUnion, tp.refinedName, tp.refinedInfo )
1331
+ tp.derivedRefinedType(parent = tp.parent.widenUnion )
1332
1332
case tp : RecType =>
1333
1333
tp.rebind(tp.parent.widenUnion)
1334
1334
case tp : HKTypeLambda =>
@@ -3152,7 +3152,9 @@ object Types {
3152
3152
3153
3153
def checkInst (using Context ): this .type = this // debug hook
3154
3154
3155
- def derivedRefinedType (parent : Type , refinedName : Name , refinedInfo : Type )(using Context ): Type =
3155
+ final def derivedRefinedType
3156
+ (parent : Type = this .parent, refinedName : Name = this .refinedName, refinedInfo : Type = this .refinedInfo)
3157
+ (using Context ): Type =
3156
3158
if ((parent eq this .parent) && (refinedName eq this .refinedName) && (refinedInfo eq this .refinedInfo)) this
3157
3159
else RefinedType (parent, refinedName, refinedInfo)
3158
3160
@@ -4056,7 +4058,7 @@ object Types {
4056
4058
case tp @ AppliedType (tycon, args) if defn.isFunctionNType(tp) =>
4057
4059
wrapConvertible(tp.derivedAppliedType(tycon, args.init :+ addInto(args.last)))
4058
4060
case tp @ defn.RefinedFunctionOf (rinfo) =>
4059
- wrapConvertible(tp.derivedRefinedType(tp.parent, tp.refinedName, addInto(rinfo)))
4061
+ wrapConvertible(tp.derivedRefinedType(refinedInfo = addInto(rinfo)))
4060
4062
case tp : MethodOrPoly =>
4061
4063
tp.derivedLambdaType(resType = addInto(tp.resType))
4062
4064
case ExprType (resType) =>
0 commit comments