File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -3211,8 +3211,16 @@ object Types {
32113211 else newLikeThis(paramNames, paramInfos, resType)
32123212
32133213 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
32143222 companion(paramNames)(
3215- x => paramInfos.mapConserve(_.subst( this , x). asInstanceOf [ PInfo ] ),
3223+ x => substParams(paramInfos , x),
32163224 x => resType.subst(this , x))
32173225
32183226 protected def prefixString : String
You can’t perform that action at this time.
0 commit comments