Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8246771 JEP 395: Records
  3. JDK-8253494

new restrictions on annotations of record components

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: None
    • Fix Version/s: 16
    • Component/s: tools
    • Labels:

      Description

      @Target(ElementType.PARAMETER)
      @interface DevAnnotation{ String value(); } record

      R(@DevAnnotation(“devA”) String s) { // Error!
            R(@DevAnnotation(“devB”) String s) {
                // Explicitly declared canonical constructor
                ...
            }
        }

      or

      R(@DevAnnotation(“devA”) String s) { // Error!
            R(String s) {
                // Explicitly declared canonical constructor
                ...
            }
        }

      this one should be erroneous too:
      R(@DevAnnotation(“devA”) String s) { // Error!
            R(@DevAnnotation(“devA”) String s) {
                // Explicitly declared canonical constructor
                ...
            }
        }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              vromero Vicente Arturo Romero Zaldivar
              Reporter:
              vromero Vicente Arturo Romero Zaldivar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: