Skip to content

Commit

Permalink
Do not use errorneous recovered types
Browse files Browse the repository at this point in the history
Do not use the original (recovered) type if it's also erroneous,
instead use the type stub.

Should fix a few tests, probably 4ish.

Signed-off-by: David Thompson <[email protected]>
  • Loading branch information
datho7561 authored and mickaelistria committed Jul 16, 2024
1 parent b84c7a6 commit 49f1463
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ public JavacTypeBinding getTypeBinding(com.sun.tools.javac.code.Type type) {
if (type instanceof ErrorType errorType
&& (errorType.getOriginalType() != com.sun.tools.javac.code.Type.noType)
&& !(errorType.getOriginalType() instanceof com.sun.tools.javac.code.Type.MethodType)
& !(errorType.getOriginalType() instanceof com.sun.tools.javac.code.Type.ForAll)) {
&& !(errorType.getOriginalType() instanceof com.sun.tools.javac.code.Type.ForAll)
&& !(errorType.getOriginalType() instanceof com.sun.tools.javac.code.Type.ErrorType)) {
JavacTypeBinding binding = getTypeBinding(errorType.getOriginalType());
binding.setRecovered(true);
return binding;
Expand Down

0 comments on commit 49f1463

Please sign in to comment.