JDK-8300786 - No longer require super() and this() to appear first in a constructor

Brian Goetz brian.goetz at oracle.com
Tue Feb 7 22:49:30 UTC 2023

That's a nice side-effect of sticking to something the spec already 
talks about!

On 2/7/2023 5:48 PM, Archie Cobbs wrote:
> Regarding the prototype implementation 
> <https://urldefense.com/v3/__https://github.com/archiecobbs/jdk/tree/SuperInit__;!!ACWV5N9M2RV99hQ!OGVhm6i6QDrc9mSIWiQZl0tp7ako7UOLnijWXkOAvtL9HJtXK5T8mzMk9-QE9NajR64Fjqx1HsTbTkdwQ-bZP5w$>, 
> it's complete and seems to be working. One nice surprise is that, 
> because the compiler already effectively implements this notion of 
> "pre-initialization context" within superclass constructors, the 
> changes required are relatively limited, in some cases, just ensuring 
> the appropriate error message is generated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-spec-experts/attachments/20230207/2f8272bb/attachment.htm>

More information about the amber-spec-experts mailing list