On Wed, 17 Sep 2025 00:57:34 GMT, Vicente Romero <[email protected]> wrote:

> This PR introduces a new Xlint category: `initialization`. When enabled it 
> will indicate if some code in an identity class couldn't be placed in the 
> prologue phase. This applies to field initializers and constructors with no 
> explicit `super` invocation. So for example for code like:
> 
> 
> class Test {
>     int i = 0;
> 
>     Test() {
>         this.i = 1;
>     }
> }
> 
> 
> a warning will be issued as if there were a super invocation at the end of 
> the constructor, the compiler would issue an error.
> 
> PS. The new lint warning had to be disabled during the build as in other case 
> it wouldn't finish

This pull request has now been integrated.

Changeset: 5d7a2510
Author:    Vicente Romero <[email protected]>
URL:       
https://git.openjdk.org/valhalla/commit/5d7a251023b705754e8845ca52e94c4c45ab983f
Stats:     594 lines in 33 files changed: 507 ins; 9 del; 78 mod

8367698: [lworld] New lint category for code that would not be allowed in the 
prologue

Reviewed-by: mcimadamore

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

PR: https://git.openjdk.org/valhalla/pull/1595

Reply via email to