Possible records tweak
daniel.smith at oracle.com
Wed Apr 29 18:55:05 UTC 2020
> On Apr 29, 2020, at 12:37 PM, John Rose <john.r.rose at oracle.com> wrote:
> So I’ve lost track of this bit: What happens if the compact constructor
> calls a virtual method on this? (Say it doesn’t explicitly mention ’this’.)
> What are the states of the fields when the virtual method runs before
> and after variable assignments in the compact constructor?
None of this discussion has proposed changing the underlying runtime semantics: the instance fields of a record are uninitialized (have their default values) at the start of the compact constructor. Without field assignments in the constructor body, the fields get assigned their "actual" value at the end of the constructor.
More information about the amber-spec-experts