Java: Remove redundant getErasure overrides

The root definition covers these cases already
This commit is contained in:
Ian Lynagh
2024-10-09 11:37:17 +01:00
parent 7ddc8f087d
commit 6c9739023d

View File

@@ -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.
*
@@ -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() }