[lworld] Integrated: 8335279: [lworld] javac should attribute instance initializers according to their final location relative to the super ctor invocation

Vicente Romero vromero at openjdk.org
Sat Jun 29 21:04:25 UTC 2024


On Sat, 29 Jun 2024 20:55:22 GMT, Vicente Romero <vromero at openjdk.org> wrote:

> this code:
> 
> 
> value class Test {
>     Test t = null;
>     Runnable r = () -> { System.err.println(t); };
> }
> 
> was being accepted by javac but then failed with a verifier error at run time. When attributing instance initializers javac should take into account the position they will have in the constructor relative to the super constructor invocation

This pull request has now been integrated.

Changeset: 62091c0b
Author:    Vicente Romero <vromero at openjdk.org>
URL:       https://git.openjdk.org/valhalla/commit/62091c0b6791381e8906e5b2a3b943cb2092a439
Stats:     21 lines in 2 files changed: 17 ins; 0 del; 4 mod

8335279: [lworld] javac should attribute instance initializers according to their final location relative to the super ctor invocation

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

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


More information about the valhalla-dev mailing list