@@ -355,7 +355,7 @@ class TypeErasure(isJava: Boolean, semiEraseVCs: Boolean, isConstructor: Boolean
355
355
* - For NoType or NoPrefix, the type itself.
356
356
* - For any other type, exception.
357
357
*/
358
- private def apply (tp : Type )(implicit ctx : Context ): Type = tp.dealias match {
358
+ private def apply (tp : Type )(implicit ctx : Context ): Type = tp match {
359
359
case _ : ErasedValueType =>
360
360
tp
361
361
case tp : TypeRef =>
@@ -377,6 +377,8 @@ class TypeErasure(isJava: Boolean, semiEraseVCs: Boolean, isConstructor: Boolean
377
377
defn.FunctionType (0 )
378
378
case AndType (tp1, tp2) =>
379
379
erasedGlb(this (tp1), this (tp2), isJava)
380
+ case tp : HKApply =>
381
+ apply(tp.superType)
380
382
case OrType (tp1, tp2) =>
381
383
ctx.typeComparer.orType(this (tp1), this (tp2), erased = true )
382
384
case tp : MethodType =>
@@ -487,7 +489,7 @@ class TypeErasure(isJava: Boolean, semiEraseVCs: Boolean, isConstructor: Boolean
487
489
* Need to ensure correspondence with erasure!
488
490
*/
489
491
private def sigName (tp : Type )(implicit ctx : Context ): TypeName = try {
490
- tp.dealias match {
492
+ tp match {
491
493
case ErasedValueType (_, underlying) =>
492
494
sigName(underlying)
493
495
case tp : TypeRef =>
@@ -508,6 +510,8 @@ class TypeErasure(isJava: Boolean, semiEraseVCs: Boolean, isConstructor: Boolean
508
510
normalizeClass(sym.asClass).fullName.asTypeName
509
511
case defn.ArrayOf (elem) =>
510
512
sigName(this (tp))
513
+ case tp : HKApply =>
514
+ sigName(tp.superType)
511
515
case JavaArrayType (elem) =>
512
516
sigName(elem) ++ " []"
513
517
case tp : TermRef =>
0 commit comments