@@ -124,8 +124,16 @@ class UnboundGenericType extends ValueOrRefType, UnboundGeneric {
124
124
}
125
125
126
126
final override predicate hasQualifiedName ( string qualifier , string name ) {
127
- super .hasQualifiedName ( qualifier , _) and
128
- name = this .getNameWithoutBrackets ( ) + "<" + this .getTypeParameterCommas ( ) + ">"
127
+ exists ( string name0 | name = name0 + "<" + this .getTypeParameterCommas ( ) + ">" |
128
+ exists ( string enclosing |
129
+ this .getDeclaringType ( ) .hasQualifiedName ( qualifier , enclosing ) and
130
+ name0 = enclosing + "+" + this .getNameWithoutBrackets ( )
131
+ )
132
+ or
133
+ not exists ( this .getDeclaringType ( ) ) and
134
+ qualifier = this .getNamespace ( ) .getQualifiedName ( ) and
135
+ name0 = this .getNameWithoutBrackets ( )
136
+ )
129
137
}
130
138
}
131
139
@@ -406,10 +414,15 @@ class ConstructedType extends ValueOrRefType, ConstructedGeneric {
406
414
}
407
415
408
416
final override predicate hasQualifiedName ( string qualifier , string name ) {
409
- exists ( string undecorated |
410
- super .hasQualifiedName ( qualifier , _) and
411
- types ( this , _, undecorated ) and
412
- name = undecorated + "<" + this .getTypeArgumentsQualifiedNames ( ) + ">"
417
+ exists ( string name0 | name = name0 + "<" + this .getTypeArgumentsQualifiedNames ( ) + ">" |
418
+ exists ( string enclosing |
419
+ this .getDeclaringType ( ) .hasQualifiedName ( qualifier , enclosing ) and
420
+ name0 = enclosing + "+" + this .getNameWithoutBrackets ( )
421
+ )
422
+ or
423
+ not exists ( this .getDeclaringType ( ) ) and
424
+ qualifier = this .getNamespace ( ) .getQualifiedName ( ) and
425
+ name0 = this .getNameWithoutBrackets ( )
413
426
)
414
427
}
415
428
}
0 commit comments