<div dir="ltr">Hi,<div><br></div><div>Reading the JEP I'm unsure about some behavior when the record is recompiled with an additional component, while the code containing the `with` block is not. Can this be clarified in the JEP? Or is this undefined for now?</div><div><br></div><div>For better understanding, let me write down a specific example:</div><div><br></div><div>MyRecord.java (v1)</div><div>```</div><div>public record MyRecord(int x, int y) { }</div><div>```</div><div><br></div><div><div>MyRecord.java (v2)</div><div>```</div><div>public record MyRecord(int x, int y, int z) { }</div><div>```</div></div><div><br></div><div><div>MyRecord.java (v3)</div><div>```</div><div>public record MyRecord(int x, int y, int z) {</div><div>  public MyRecord(int x, int y) { this(x, y, 0); }</div><div>}</div><div>```</div></div><div><br></div><div>Let's suppose we have the following class which we compile against v1 of `MyRecord`, and then never recompile:</div><div><br></div><div>```</div><div>public class MyClass {</div><div>  public static MyRecord adjustX(MyRecord src) {</div><div>    return src with { x = 9; }</div><div>  }</div><div>}</div><div>```</div><div><br></div><div>Now my question is: What is the output of the following code?</div><div><br></div><div>```</div><div>System.out.println(MyClass.adjustX(new MyRecord(1, 2, 3)).z());</div><div>```</div><div><br></div><div>A, When running with v2 of `MyRecord` on the classpath</div><div>B, When running with v3 of `MyRecord` on the classpath.<br></div><div><br></div><div>Thanks,</div><div>Attila</div><div><br></div></div>