Open
Description
WildcardTypeAccess.hasNoBound() returns for wildcards bounded by an array type, that they have no bound.
Example query:
import java
from WildcardTypeAccess w
where
exists (w.getUpperBound())
and w.hasNoBound()
select wThe issue appears to be that this predicate only checks for TypeAccess children, however ArrayTypeAccess is not a subclass of TypeAccess:
codeql/java/ql/src/semmle/code/java/Expr.qll
Lines 1589 to 1590 in 595ab44
Maybe it would suffice checking that any child expression at index 0 or 1 exists (or would that also match annotations somehow)?