File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
org.eclipse.jdt.core.javac/src/org/eclipse/jdt/internal/javac/dom Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1010 *******************************************************************************/
1111package org .eclipse .jdt .internal .javac .dom ;
1212
13- import org .eclipse .jdt .core .dom .ITypeBinding ;
1413import org .eclipse .jdt .core .dom .JavacBindingResolver ;
1514
15+ import com .sun .tools .javac .code .Type ;
1616import com .sun .tools .javac .code .Symbol .ClassSymbol ;
1717import com .sun .tools .javac .code .Symbol .TypeSymbol ;
18- import com .sun .tools .javac .code .Type ;
1918
2019/**
2120 * Represents a binding for a type that javac struggles to recover,
@@ -73,7 +72,7 @@ private String getKeyImpl() {
7372 }
7473
7574 @ Override
76- public ITypeBinding getErasure () {
75+ public JavacTypeBinding getErasure () {
7776 return this .resolver .bindings .getTypeBinding (this .types .erasure (this .originatingSymbol .type ));
7877 }
7978
Original file line number Diff line number Diff line change @@ -744,7 +744,7 @@ public int getRank() {
744744 }
745745
746746 @ Override
747- public ITypeBinding getComponentType () {
747+ public JavacTypeBinding getComponentType () {
748748 if (this .type instanceof ArrayType arrayType ) {
749749 return this .resolver .bindings .getTypeBinding (arrayType .elemtype );
750750 }
@@ -933,7 +933,12 @@ public ITypeBinding getElementType() {
933933 }
934934
935935 @ Override
936- public ITypeBinding getErasure () {
936+ public JavacTypeBinding getErasure () {
937+ if (isArray ()) {
938+ JavacTypeBinding component = getComponentType ().getErasure ();
939+ ArrayType arrayType = this .types .makeArrayType (component .type );
940+ return this .resolver .bindings .getTypeBinding (arrayType , false );
941+ }
937942 if (isParameterizedType ()) {
938943 // generic binding
939944 return this .resolver .bindings .getTypeBinding (this .type , true );
You can’t perform that action at this time.
0 commit comments