RFR: 8334258: Compiler erronousely allows access to instance variable in argument expression of a constructor invocation
Archie Cobbs
acobbs at openjdk.org
Thu Jun 13 21:05:23 UTC 2024
For the "flexible constructors" JEP 482 feature, the compiler allows assignments to instance fields in early construction contexts. However, when it creates this exception it is failing to check that the feature is enabled. This patch adds that check.
-------------
Commit messages:
- Disallow early assignments without FLEXIBLE_CONSTRUCTORS feature.
Changes: https://git.openjdk.org/jdk/pull/19712/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19712&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8334258
Stats: 83 lines in 7 files changed: 74 ins; 0 del; 9 mod
Patch: https://git.openjdk.org/jdk/pull/19712.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19712/head:pull/19712
PR: https://git.openjdk.org/jdk/pull/19712
More information about the compiler-dev
mailing list