On Wed, 1 Jul 2026 18:32:44 GMT, Chris Plummer <[email protected]> wrote:

>> This is setup for the sentence that follows. Without it, it would be too 
>> much of a surprise to say that the function cannot be used to return early 
>> from the constructor of a value class.
>
> I had considered that. There is no mention of class initializer below. Also, 
> I would think that these terms are already generally understood and don't 
> need clarification here.

It's technical debt that ForceEarlyReturnVoid didn't clearly document that it 
could be used to force early return from constructors or static initializers. 
There was discussion on this in the CSR wondering about this.

In time, the restriction will need to be extended to class initializers then 
the class has strictly-initialized static fields.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2604#discussion_r3508337809

Reply via email to