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

confusing error message for records with no parens

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 14
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b27

      Description

      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"

        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: