RFR: Fixing completion detection for null-restricted variables and fixing behavior for incorrect null-restricted variables without an initializer.

Maurizio Cimadamore mcimadamore at openjdk.org
Tue Jan 20 16:54:49 UTC 2026


On Mon, 19 Jan 2026 15:42:46 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

> Fixing behavior in two cases:
> - `String! str = ""` (i.e. missing semicolon) should work. This is achieved by fixing the completion analysis to report the snippet as `COMPLETE_WITH_SEMI`.
> - `String! str` (i.e. missing initializer). This should produce an error saying initializer is required, achieved by not using the null initializer in this case.

Looks good!

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

Marked as reviewed by mcimadamore (Committer).

PR Review: https://git.openjdk.org/valhalla/pull/1932#pullrequestreview-3683216630


More information about the valhalla-dev mailing list