JEP 468 - binary compatibility clarifications

Attila Kelemen attila.kelemen85 at gmail.com
Tue Apr 30 09:19:19 UTC 2024


Thanks for both the answers. So, to summarize: JEP 468 leaves this behavior
undefined (given the JLS saying "may break"), but for now it will work as
if I did things manually. Though the spec leaves open the possibility of an
indy using implementation in the future.

Brian Goetz <brian.goetz at oracle.com> ezt írta (időpont: 2024. ápr. 29., H,
17:32):

> Gavin answered for the spec; I'll answer now for the implementation.
>
> The current implementation will try to do an `invokespecial` of the (int,
> int) constructor, which will succeed with v1 and v3, but not v2.  It will
> also "inline" the (int, int) record pattern (shredding it into an
> instanceof test, and calls to accessors), which, once compiled, will work
> against v1/v2/v3.
>
> When we get to reconstruction expressions for ordinary classes, the
> pattern part will work like the constructor part today, assuming that you
> declared an explicit deconstructor in v3.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20240430/3d6c6d50/attachment.htm>


More information about the amber-dev mailing list