File tree 1 file changed +9
-1
lines changed
compiler/src/dotty/tools/dotc/core 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -3211,8 +3211,16 @@ object Types {
3211
3211
else newLikeThis(paramNames, paramInfos, resType)
3212
3212
3213
3213
def newLikeThis (paramNames : List [ThisName ], paramInfos : List [PInfo ], resType : Type )(using Context ): This =
3214
+ def substParams (pinfos : List [PInfo ], to : This ): List [PInfo ] = pinfos match
3215
+ case pinfo :: rest =>
3216
+ val pinfo1 = pinfo.subst(this , to).asInstanceOf [PInfo ]
3217
+ val rest1 = substParams(rest, to)
3218
+ if (pinfo1 eq pinfo) && (rest1 eq rest) then pinfos
3219
+ else pinfo1 :: rest1
3220
+ case nil =>
3221
+ nil
3214
3222
companion(paramNames)(
3215
- x => paramInfos.mapConserve(_.subst( this , x). asInstanceOf [ PInfo ] ),
3223
+ x => substParams(paramInfos , x),
3216
3224
x => resType.subst(this , x))
3217
3225
3218
3226
protected def prefixString : String
You can’t perform that action at this time.
0 commit comments