CodeQL library for Java/Kotlin
codeql/java-all 0.8.11-dev (changelog, source)
Search

Member predicate RefType::commonSubtype

A common (reflexive, transitive) subtype of the erasures of types t1 and t2, if it exists.

If there is no such common subtype, then the two types are disjoint. However, the converse is not true; for example, the parameterized types List<Integer> and Collection<String> are disjoint, but their erasures (List and Collection, respectively) do have common subtypes (such as List itself).

For the definition of the notion of erasure see JLS v8, section 4.6 (Type Erasure).

RefType commonSubtype(RefType other)