Summary
Change the implementation of javax.lang.model.type.ErrorType.getEnclosingType() to return an object with TypeKind.NONE, instead of an object with TypeKind.ERROR.
Problem
Currently, the javac's implementation of ErrorType.getEnclosingType() will return the type itself. This is causing problems even to javac as such, and seems unlikely to be useful to API users (as they might need to prevent a recursive walk through the enclosing types).
Solution
Return a type with TypeKind.NONE from javax.lang.model.type.ErrorType.getEnclosingType(), unconditionally.
Specification
javax.lang.model.type.ErrorType.getEnclosingType() unconditionally return a TypeMirror with TypeKind.NONE. No javadoc change.
- csr of
-
JDK-8196519 Incomplete classpath causes infinite recursion in Resolve.isAccessible
-
- Resolved
-