[lworld] RFR: 8376045: [lworld] Treat @NullRestricted fields as ACC_STRICT_INIT on load

Chen Liang liach at openjdk.org
Fri Jan 23 19:25:08 UTC 2026


On Thu, 22 Jan 2026 21:40:30 GMT, Chen Liang <liach at openjdk.org> wrote:

> Automatically inject strict for NR annotations, and remove tests that previously kept them separate.

The annotation `@Strict` actually has a javac side effect - it makes all initializer statements and constructor bodies early-construction by default. This is not compatible with the planned language evolution with `!` types. The PR #1952 fixes that javac side effect.

After both #1951 and #1952 are merged, I plan to move on to to the simplification you mentioned.

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

PR Comment: https://git.openjdk.org/valhalla/pull/1951#issuecomment-3791935186


More information about the valhalla-dev mailing list