Implicit constructor of the super class of a null restricted value class
Remi Forax
forax at univ-mlv.fr
Sat Oct 21 07:27:37 UTC 2023
Hello,
I had a little more time to re-read the different specs :)
In https://bugs.openjdk.org/browse/JDK-8317765,
an implicit constructor must be public and the super class is either Object or a super class with an implicit constructor.
This means that we can NOT create a null restricted value record because the constructor of Record is protected.
I think the constraints on the implicit constructor of the super class should be relaxed. The implicit constructor of the super class does not have to be public.
The implicit constructor of a super class just has to be visible from the implicit constructor of the value class like if there was a super() call inside the implicit constructor of the value class.
regards,
Rémi
More information about the valhalla-spec-observers
mailing list