[lw4] Record component may not have the name isValueObject

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • repo-valhalla
    • Affects Version/s: repo-valhalla
    • Component/s: tools
    • 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.

            Assignee:
            Vicente Arturo Romero Zaldivar
            Reporter:
            Srikanth Adayapalam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: