Skip to content

Commit

Permalink
Java: Remove redundant getErasure overrides
Browse files Browse the repository at this point in the history
The root definition covers these cases already
  • Loading branch information
igfoo committed Oct 9, 2024
1 parent d0ca39f commit b7c6cd9
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions java/ql/lib/semmle/code/java/Generics.qll
Original file line number Diff line number Diff line change
Expand Up @@ -330,13 +330,6 @@ class ParameterizedType extends ClassOrInterface {
typeVars(_, _, _, this)
}

/**
* The erasure of a parameterized type is its generic counterpart.
*
* For example, the erasure of both `X<Number>` and `X<Integer>` is `X<T>`.
*/
override RefType getErasure() { erasure(this, result) or this.(GenericType) = result }

/**
* Gets the generic type corresponding to this parameterized type.
*
Expand Down Expand Up @@ -406,13 +399,6 @@ class ParameterizedInterface extends Interface, ParameterizedType {
class RawType extends RefType {
RawType() { isRaw(this) }

/**
* The erasure of a raw type is its generic counterpart.
*
* For example, the erasure of `List` is `List<E>`.
*/
override RefType getErasure() { erasure(this, result) }

/** Holds if this type originates from source code. */
override predicate fromSource() { not any() }

Expand Down

0 comments on commit b7c6cd9

Please sign in to comment.