<div dir="ltr"><div>Hi Gernot,</div><div><br></div><div dir="ltr">I believe that the contradiction is resolved if Record (which is abstract) is also declared as a value class.</div><div dir="ltr"><br></div><div>While the spec doesn't state explicitly that an identity class can extend an abstract value class, I think that has to be the case if a Record can be either value or identity, and also for the following binary compatibility statement to be meaningful:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Modifying an <code>abstract</code> or <code>final</code> identity
class to be a <code>value</code> class does not break compatibility with
pre-existing binaries.

</blockquote><div> <br></div><div>If an existing abstract identity class (such as Record) has identity subclasses, and it does not break compatibility to modify Record to be a value class, then those identity subclasses must continue to function with an abstract value superclass.<br></div><div><br></div><div>I think it would be clearer if the spec were to explicitly state the following:<br></div><div><br></div><div>* An identity class is permitted to extend an abstract value superclass.</div><div>* The abstract class java.lang.Record must be declared as a value class.<br></div><div><br></div><div>Cheers,</div><div>Clement<br></div><div><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 4, 2024 at 1:58 AM Gernot Neppert <<a href="mailto:mcnepp02@googlemail.com">mcnepp02@googlemail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="ltr"></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr">Hi Dan,</div><div dir="ltr"><br></div><div dir="ltr">these paragraphs seem contradictionary with regards to the allowed superclasses of value-classes:</div><div dir="ltr"> 8.1.1.5 forbids any identity-superclass other than Object, while 8.10 states that the superclass of every (value-)record-class is (the identity-class) Record.</div><div dir="ltr"><br></div><div dir="ltr">To me, it looks as if 8.1.1.5 should mention Record as another possible implicit superclass.</div><div dir="ltr"><br></div><div dir="ltr">Regards, Gernot</div><div dir="ltr"><p style="padding:0pt;margin:1ex 0em;font-family:"DejaVu Sans","Bitstream Vera Sans","Luxi Sans",Verdana,Arial,Helvetica,sans-serif;font-size:13.3333px"><br></p><p style="padding:0pt;margin:1ex 0em;font-family:"DejaVu Sans","Bitstream Vera Sans","Luxi Sans",Verdana,Arial,Helvetica,sans-serif;font-size:13.3333px"><br></p><p style="padding:0pt;margin:1ex 0em;font-family:"DejaVu Sans","Bitstream Vera Sans","Luxi Sans",Verdana,Arial,Helvetica,sans-serif;font-size:13.3333px"><br></p><blockquote type="cite">Am 03.06.2024 um 21:00 schrieb Dan Smith <<a href="mailto:daniel.smith@oracle.com" target="_blank">daniel.smith@oracle.com</a>>:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><span>I've posted updated specifications for JEP 401 here:</span><br><span></span><br><span><a href="https://cr.openjdk.org/~dlsmith/jep401/jep401-20240603/specs/value-objects-jls.html" target="_blank">https://cr.openjdk.org/~dlsmith/jep401/jep401-20240603/specs/value-objects-jls.html</a></span><br><span><a href="https://cr.openjdk.org/~dlsmith/jep401/jep401-20240603/specs/value-objects-jvms.html" target="_blank">https://cr.openjdk.org/~dlsmith/jep401/jep401-20240603/specs/value-objects-jvms.html</a></span><br><span></span><br><span>These are intended to address all the needs of JEP 401, and I don't expect many further revisions—but as always, happy to hear any feedback.</span><br><span></span><br></div></blockquote></div></blockquote></div></div>