diagnostics for non-applicable type annotations

Chris Povirk cpovirk at google.com
Tue Jan 9 16:26:29 UTC 2024


Thanks, Liam.

We've found the current error messages to be a source of confusion: While
the average user doesn't use type-use annotations, those users who do use
them seem to hit this pretty frequently. We have our own FAQ entry about it
in our internal documentation, and I also refer people to the Checker
Framework's documentation
<https://checkerframework.org/manual/#common-problems-non-typechecking>,
which gives advice similar to that implemented by Liam's PR. I would expect
for that page and this Stack Overflow answer
<https://stackoverflow.com/a/21385939/28465> to get more traffic as
type-use annotations grow in popularity, as we're aiming for them to do as
part of our work on JSpecify nullness. The error-message changes could save
users a trip to those docs.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/compiler-dev/attachments/20240109/0a265779/attachment.htm>


More information about the compiler-dev mailing list