RFR: 8334258: Compiler erronousely allows access to instance variable in argument expression of a constructor invocation [v2]

Archie Cobbs acobbs at openjdk.org
Fri Jun 14 16:12:24 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.

Archie Cobbs has updated the pull request incrementally with two additional commits since the last revision:

 - Fix test failures caused by feature check happening too soon.
 - Fix incorrect column number in compiler error message expected output.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/19712/files
  - new: https://git.openjdk.org/jdk/pull/19712/files/7abe6171..d486bbae

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=19712&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19712&range=00-01

  Stats: 7 lines in 2 files changed: 3 ins; 3 del; 1 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