Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8235446

confusing error message for records with no parens

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 14
    • None
    • tools
    • None
    • b27

      the compiler produce a confusing error message for this code:

      public record Record {
      }

      Compiler produced the following error message:

      error: class, interface, enum, or record expected
      public record Record {
             ^
      1 error

      we should try to produce a better error message on the lines of:
      "incorrect record declaration"

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

              Created:
              Updated:
              Resolved: