On 11/10/2019 8:07 PM, Tagir Valeev wrote:
1. It's not explicitly specified whether an explicitly declared
canonical constructor must be 'public' like it's specified for
compact constructors. Does this mean that I can declare
non-public canonical constructor?
The compact constructor _is_ a canonical constructor; its just an
alternate notation for it, and its an error to declare it both
ways (because its an error to declare the same member twice). The
canonical constructor should be public (yes, Remi, we see you
there), whether declared implicitly, explicitly with a full
argument list, or explicitly with a compact ctor.
Sure, this sounds consistent. I'm just saying that this part of the
current spec draft is incomplete.
Yes, this was the issue @
https://mail.openjdk.java.net/pipermail/amber-spec-experts/2019-November/001760.html
and
https://mail.openjdk.java.net/pipermail/amber-spec-experts/2019-November/001761.html
-- there is a slight misfactoring in how an explicitly declared
canonical ctor is specified.
Alex