JDK-8325805 : Compiler Implementation for Flexible Constructor Bodies (Second Preview)
  • Type: Sub-task
  • Component: tools
  • Sub-Component: javac
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-02-13
  • Updated: 2025-01-06
  • Resolved: 2024-05-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 23
23 b25Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Description
This is an extension of the "statements before super()" work of JDK-8194743.

The new addition is: in constructor prologues, instead of completely disallowing access to instance fields, make an exception to allow assignments to instance fields that are not inherited from superclasses.
Comments
Changeset: 87a06b6c Author: Archie Cobbs <acobbs@openjdk.org> Committer: Vicente Romero <vromero@openjdk.org> Date: 2024-05-28 13:15:20 +0000 URL: https://git.openjdk.org/jdk/commit/87a06b6ce41f8623d9111b4e41c72f0ddf842acd
28-05-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/18088 Date: 2024-03-01 17:51:11 +0000
22-03-2024

Draft PR: https://github.com/openjdk/jdk/pull/18088
01-03-2024