[lworld] RFR: 8368795: [lworld] javac rejects assignments to components of array fields with initializers in the prologue

Chen Liang liach at openjdk.org
Thu Oct 9 11:55:31 UTC 2025


On Mon, 6 Oct 2025 16:01:39 GMT, Vicente Romero <vromero at openjdk.org> wrote:

> there are some cases for which a proxy variable should be generated by javac but it is not. When this happens, the generated class won't pass the verifier. Setting an array component in the prologue is one of those cases but also assigning to a field of an instance field like:
> 
> value class Test {
>     static class Foo { 
>         int x;
>     }
>     private final Foo data = new Foo();
>     Test() {
>         data.x = 12;
>         super();
>     }
> }

Marked as reviewed by liach (Committer).

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

PR Review: https://git.openjdk.org/valhalla/pull/1664#pullrequestreview-3318593157


More information about the valhalla-dev mailing list