Skip to content

Commit 69a5e97

Browse files
robstrykermickaelistria
authored andcommitted
Fix test0298
Signed-off-by: Rob Stryker <[email protected]>
1 parent d7f2bdd commit 69a5e97

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacBindingResolver.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,8 +649,9 @@ public ITypeBinding resolveType(Type type) {
649649
return this.bindings.getTypeBinding(((JCNewArray)jcArrayCreation).type);
650650
}
651651
JCTree jcTree = this.converter.domToJavac.get(type);
652-
if( !this.isRecoveringBindings && jcTree.type instanceof ErrorType) {
653-
return null;
652+
if( !this.isRecoveringBindings ) {
653+
if( jcTree.type instanceof ErrorType )
654+
return null;
654655
}
655656

656657
if (jcTree instanceof JCIdent ident && ident.type != null) {
@@ -673,6 +674,14 @@ public ITypeBinding resolveType(Type type) {
673674
return this.bindings.getTypeBinding(wcType.type);
674675
}
675676
if (jcTree instanceof JCTypeApply jcta && jcta.type != null) {
677+
if( !this.isRecoveringBindings ) {
678+
for( var t : jcta.type.getTypeArguments() ) {
679+
if( t instanceof ErrorType ) {
680+
return null;
681+
}
682+
}
683+
}
684+
676685
var res = this.bindings.getTypeBinding(jcta.type);
677686
if (res != null) {
678687
return res;

0 commit comments

Comments
 (0)