@@ -521,7 +521,13 @@ private predicate unificationTargets(RefType t1, Type t2) {
521521 t2 = a2 .getComponentType ( )
522522 )
523523 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 |
525531 unificationTargets ( pt1 , pt2 ) and
526532 t1 = pt1 .getTypeArgument ( pos ) and
527533 t2 = pt2 .getTypeArgument ( pos )
@@ -565,10 +571,12 @@ private predicate hasParameterSubstitution(
565571 GenericType g1 , ParameterizedType pt1 , GenericType g2 , ParameterizedType pt2 , TypeVariable v ,
566572 RefType subst
567573) {
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+ )
572580}
573581
574582/**
0 commit comments