-
Bug
-
Resolution: Fixed
-
P4
-
repo-valhalla
-
generic
-
generic
http://cr.openjdk.java.net/~dlsmith/jep8277163/jep8277163-20220519/specs/value-objects-jls.html
8.10.1 Record Components
...
It is a compile-time error for a record declaration to declare a record component with the name clone, finalize, getClass, hashCode, isValueObject, notify, notifyAll, toString, or wait.
ATM, javac does not enforce the restriction for isValueObject, so
record R(int finalize, int hashCode, int isValueObject) {}
produces two errors rather than three.
8.10.1 Record Components
...
It is a compile-time error for a record declaration to declare a record component with the name clone, finalize, getClass, hashCode, isValueObject, notify, notifyAll, toString, or wait.
ATM, javac does not enforce the restriction for isValueObject, so
record R(int finalize, int hashCode, int isValueObject) {}
produces two errors rather than three.