@@ -3452,7 +3452,7 @@ object Types {
3452
3452
if ((cls is PackageClass ) || cls.owner.isTerm) symbolicTypeRef
3453
3453
else TypeRef (prefix, cls.name, clsDenot)
3454
3454
appliedRefCache =
3455
- tref.appliedTo(cls.typeParams.map(_.typeRef)) // @!!! cache?
3455
+ tref.appliedTo(cls.typeParams.map(_.typeRef))
3456
3456
}
3457
3457
appliedRefCache
3458
3458
}
@@ -3562,7 +3562,6 @@ object Types {
3562
3562
3563
3563
class RealTypeBounds (lo : Type , hi : Type ) extends TypeBounds (lo, hi)
3564
3564
3565
- // @!!! get rid of variance
3566
3565
abstract class TypeAlias (val alias : Type ) extends TypeBounds (alias, alias) {
3567
3566
3568
3567
/** pre: this is a type alias */
@@ -3829,12 +3828,17 @@ object Types {
3829
3828
| NoPrefix => tp
3830
3829
3831
3830
case tp : AppliedType =>
3832
- def mapArg (arg : Type , tparam : ParamInfo ): Type = arg match {
3833
- case arg : TypeBounds => this (arg)
3834
- case _ => atVariance(variance * tparam.paramVariance)(this (arg))
3831
+ def mapArgs (args : List [Type ], tparams : List [ParamInfo ]): List [Type ] = args match {
3832
+ case arg :: args1 =>
3833
+ val arg1 = arg match {
3834
+ case arg : TypeBounds => this (arg)
3835
+ case arg => atVariance(variance * tparams.head.paramVariance)(this (arg))
3836
+ }
3837
+ arg1 :: mapArgs(args1, tparams.tail)
3838
+ case nil =>
3839
+ nil
3835
3840
}
3836
- derivedAppliedType(tp, this (tp.tycon),
3837
- tp.args.zipWithConserve(tp.typeParams)(mapArg))
3841
+ derivedAppliedType(tp, this (tp.tycon), mapArgs(tp.args, tp.typeParams))
3838
3842
3839
3843
case tp : RefinedType =>
3840
3844
derivedRefinedType(tp, this (tp.parent), this (tp.refinedInfo))
0 commit comments