@@ -521,7 +521,13 @@ private predicate unificationTargets(RefType t1, Type t2) {
521
521
t2 = a2 .getComponentType ( )
522
522
)
523
523
or
524
- exists ( ParameterizedType pt1 , ParameterizedType pt2 , int pos |
524
+ unificationTargetsParameterized ( _, _, t1 , t2 )
525
+ }
526
+
527
+ private predicate unificationTargetsParameterized (
528
+ ParameterizedType pt1 , ParameterizedType pt2 , RefType t1 , RefType t2
529
+ ) {
530
+ exists ( int pos |
525
531
unificationTargets ( pt1 , pt2 ) and
526
532
t1 = pt1 .getTypeArgument ( pos ) and
527
533
t2 = pt2 .getTypeArgument ( pos )
@@ -565,10 +571,12 @@ private predicate hasParameterSubstitution(
565
571
GenericType g1 , ParameterizedType pt1 , GenericType g2 , ParameterizedType pt2 , TypeVariable v ,
566
572
RefType subst
567
573
) {
568
- unificationTargets ( pt1 , pt2 ) and
569
- exists ( int pos | hasSubstitution ( pt1 .getTypeArgument ( pos ) , pt2 .getTypeArgument ( pos ) , v , subst ) ) and
570
- g1 = pt1 .getGenericType ( ) and
571
- g2 = pt2 .getGenericType ( )
574
+ exists ( RefType t1 , RefType t2 |
575
+ unificationTargetsParameterized ( pt1 , pt2 , t1 , t2 ) and
576
+ hasSubstitution ( t1 , t2 , v , subst ) and
577
+ g1 = pt1 .getGenericType ( ) and
578
+ g2 = pt2 .getGenericType ( )
579
+ )
572
580
}
573
581
574
582
/**
0 commit comments