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

confusing error message for records with no parens

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 14
    • None
    • tools
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: