File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
java/ql/src/utils/stub-generator Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -285,14 +285,19 @@ private string stubQualifier(RefType t) {
285285 else result = ""
286286}
287287
288+ pragma [ nomagic]
289+ private predicate needsPackageNameHelper ( RefType t , GeneratedTopLevel top , string name ) {
290+ t .getSourceDeclaration ( ) = [ getAReferencedType ( top ) , top ] .getSourceDeclaration ( ) and
291+ name = t .getName ( )
292+ }
293+
288294/**
289295 * Holds if `t` may clash with another type of the same name, so should be referred to using the fully qualified name
290296 */
291297private predicate needsPackageName ( RefType t ) {
292- exists ( GeneratedTopLevel top , RefType other |
293- t .getSourceDeclaration ( ) = [ getAReferencedType ( top ) , top ] .getSourceDeclaration ( ) and
294- other .getSourceDeclaration ( ) = [ getAReferencedType ( top ) , top ] .getSourceDeclaration ( ) and
295- t .getName ( ) = other .getName ( ) and
298+ exists ( GeneratedTopLevel top , RefType other , string name |
299+ needsPackageNameHelper ( t , top , name ) and
300+ needsPackageNameHelper ( other , top , name ) and
296301 t != other
297302 )
298303}
You can’t perform that action at this time.
0 commit comments