@@ -192,16 +192,16 @@ trait Substituters { this: Context =>
192
192
193
193
override def mapOver2 (tp : Type ) = tp match {
194
194
case tp : AppliedType =>
195
- def mapArgs (args : List [Type ], tparams : List [ ParamInfo ] ): List [Type ] = args match {
195
+ def mapArgs (args : List [Type ]): List [Type ] = args match {
196
196
case arg :: otherArgs =>
197
197
val arg1 = this (arg)
198
- val otherArgs1 = mapArgs(otherArgs, tparams.tail )
198
+ val otherArgs1 = mapArgs(otherArgs)
199
199
if ((arg1 eq arg) && (otherArgs1 eq otherArgs)) args
200
200
else arg1 :: otherArgs1
201
201
case nil =>
202
202
nil
203
203
}
204
- derivedAppliedType(tp, this (tp.tycon), mapArgs(tp.args, tp.typeParams ))
204
+ derivedAppliedType(tp, this (tp.tycon), mapArgs(tp.args))
205
205
case _ =>
206
206
mapOver3(tp)
207
207
}
@@ -213,6 +213,22 @@ trait Substituters { this: Context =>
213
213
case _ : ThisType | _ : BoundType => tp
214
214
case _ => mapOver2(tp)
215
215
}
216
+
217
+ override def mapOver2 (tp : Type ) = tp match {
218
+ case tp : AppliedType =>
219
+ def mapArgs (args : List [Type ]): List [Type ] = args match {
220
+ case arg :: otherArgs =>
221
+ val arg1 = this (arg)
222
+ val otherArgs1 = mapArgs(otherArgs)
223
+ if ((arg1 eq arg) && (otherArgs1 eq otherArgs)) args
224
+ else arg1 :: otherArgs1
225
+ case nil =>
226
+ nil
227
+ }
228
+ derivedAppliedType(tp, this (tp.tycon), mapArgs(tp.args))
229
+ case _ =>
230
+ mapOver3(tp)
231
+ }
216
232
}
217
233
218
234
final class Subst2Map (from1 : Symbol , to1 : Type , from2 : Symbol , to2 : Type ) extends DeepTypeMap {
0 commit comments