RFR: 8326485: Assertion due to Type.addMetadata adding annotations to already-annotated type

Jan Lahoda jlahoda at openjdk.org
Thu Jan 30 15:07:54 UTC 2025


On Thu, 23 Jan 2025 16:17:45 GMT, Aggelos Biboudis <abimpoudis at openjdk.org> wrote:

> We end up with an errorType having annotation metadata (which subsequently results in this assertion getting invalidated after `Type ret = typeWithAnnotations(type, enclTy, annotations);` is executed).
> 
> What if we continue to try to define the `enclTy` (iteratively)? The error can still be reported appropriately. If this PR is merged it reproduces the original test case by running as expected: many errors without a crash:
> 
> 
> javac src/main/java/net/ccbluex/liquidbounce/injection/mixins/minecraft/gui/MixinChatInputSuggestor.java -cp /tmp/jars/annotations-20.1.0.jar:/tmp/jars/kotlin-compiler-embeddable-1.9.0.jar
> 
> 
> WDYT?

Looks good to me.

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

Marked as reviewed by jlahoda (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/23272#pullrequestreview-2584169163


More information about the compiler-dev mailing list