Skip to content

Commit aadbc34

Browse files
mickaelistriarobstryker
authored andcommitted
As spec'd in Javadoc, make getErasure() return this for generic types
1 parent 36146d1 commit aadbc34

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

org.eclipse.jdt.core.javac/src/org/eclipse/jdt/internal/javac/dom/JavacTypeBinding.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,6 +1070,9 @@ public ITypeBinding getElementType() {
10701070

10711071
@Override
10721072
public JavacTypeBinding getErasure() {
1073+
if (isGenericType()) {
1074+
return this;
1075+
}
10731076
if (isArray()) {
10741077
JavacTypeBinding component = getComponentType().getErasure();
10751078
ArrayType arrayType = this.types.makeArrayType(component.type);

0 commit comments

Comments
 (0)