RFR: 8337998: CompletionFailure in getEnclosingType attaching type annotations

Liam Miller-Cushon cushon at openjdk.org
Fri Aug 9 19:28:42 UTC 2024


On Fri, 9 Aug 2024 18:03:57 GMT, Vicente Romero <vromero at openjdk.org> wrote:

>> Yes if the annotation is missing that should get handled earlier, the issue here is if visiting the annotated type causes completion failures, e.g. when calling `getEnclosingType`.
>
> right I guess I was confused by the key in the error message: `type.annotation.not.found`

Good point, I will think of a better name for the diagnostic key.

It would also work to use a more generic error message for this, but I think it is helpful to include some context about the annotation that was being attached when the completion failure occurred, as a hint to where the problem is.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20495#discussion_r1712037670


More information about the compiler-dev mailing list