RFR: 8334055: Unhelpful 'required: reference' diagnostics after JDK-8043226 [v2]
Liam Miller-Cushon
cushon at openjdk.org
Thu Jul 11 02:33:39 UTC 2024
> Please consider this fix for [JDK-8334055: Unhelpful 'required: reference' diagnostics after JDK-8043226](https://bugs.openjdk.org/browse/JDK-8334055), which partially reverts some logic originally added by the fix for [JDK-8043226](https://bugs.openjdk.org/browse/JDK-8043226).
>
> The core of JDK-8043226 is preserved, improved diagnostics are still reported where 'scoping construct cannot be annotated' diagnostics were emitted previously.
>
> The reverted logic affects attribution of type annotations on package names, which was intended to enable better diagnostics, but also affected diagnostics for type annotations on missing symbols.
>
>
> CantAnnotateMissingSymbol.java:12: error: unexpected type
> List<@TA NoSuch> x;
> ^
> required: reference
> found: NoSuch
>
>
> The restored behavior is:
>
>
> CantAnnotateMissingSymbol.java:12: error: cannot find symbol
> List<@TA NoSuch> x;
> ^
> symbol: class NoSuch
> location: class CantAnnotateMissingSymbol
Liam Miller-Cushon has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
- Merge remote-tracking branch 'origin/master' into JDK-8334055
- Add a regression test
- 8334055: Unhelpful 'required: reference' diagnostics after JDK-8043226
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/19667/files
- new: https://git.openjdk.org/jdk/pull/19667/files/b4955142..fca8f55b
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=19667&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=19667&range=00-01
Stats: 50189 lines in 1259 files changed: 33400 ins; 10891 del; 5898 mod
Patch: https://git.openjdk.org/jdk/pull/19667.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19667/head:pull/19667
PR: https://git.openjdk.org/jdk/pull/19667
More information about the compiler-dev
mailing list