[lworld] RFR: 8369860: [lworld] Javac generates duplicate initializer code
Vicente Romero
vromero at openjdk.org
Fri Oct 17 22:31:36 UTC 2025
For code like:
value class Test {
static class Foo {
int x;
int getX() { return x; }
}
private final Foo data = new Foo();
Test() {
data.getX();
super();
}
}
javac generates code corresponding to the initialization of field `data` twice, which is incorrect
-------------
Commit messages:
- 8369860: [lworld] Javac generates duplicate initializer code
Changes: https://git.openjdk.org/valhalla/pull/1686/files
Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1686&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8369860
Stats: 149 lines in 3 files changed: 66 ins; 60 del; 23 mod
Patch: https://git.openjdk.org/valhalla/pull/1686.diff
Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1686/head:pull/1686
PR: https://git.openjdk.org/valhalla/pull/1686
More information about the valhalla-dev
mailing list