<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    thanks for your proposal, the final version will probably be a bit
    shorter but this one could be a good start<br>
    <br>
    Vicente<br>
    <br>
    <div class="moz-cite-prefix">On 9/19/22 12:58, Ethan McCue wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:CA+NR86hzJivhFDjdcVGepGg9rcT4wUhj-J4r2kTXSGE3XnnFZA@mail.gmail.com">
      
      <div dir="ltr">Ideally, the error message could be something like<br>
        <br>
        <span style="font-family:monospace">    error[E0123]: record
          header expected</span><br style="font-family:monospace">
        <span style="font-family:monospace">     -->
          src/Record.java:1:20</span><br style="font-family:monospace">
        <span style="font-family:monospace">      |</span><br style="font-family:monospace">
        <span style="font-family:monospace">    1 |     public record
          Record {</span><br style="font-family:monospace">
        <span style="font-family:monospace">      |                     
             ^ record header required here</span><br style="font-family:monospace">
        <span style="font-family:monospace">      |</span><br style="font-family:monospace">
        <span style="font-family:monospace">    help: to make a record
          with no components, use an empty header</span><br style="font-family:monospace">
        <span style="font-family:monospace">      |</span><br style="font-family:monospace">
        <span style="font-family:monospace">    1 | </span><span style="font-family:monospace">public record Record() {</span><br style="font-family:monospace">
        <span style="font-family:monospace">      |</span><br style="font-family:monospace">
        <br style="font-family:monospace">
        <span style="font-family:monospace">    For more information
          about this error, try `javac --explain E0123`.<br>
        </span><br>
        I'm sorry that I haven't had my life in enough of a line to make
        that full proposal though.</div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Mon, Sep 19, 2022 at 10:29
          AM Vicente Romero <<a href="mailto:vicente.romero@oracle.com" moz-do-not-send="true" class="moz-txt-link-freetext">vicente.romero@oracle.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi
          Jaikiran,<br>
          <br>
          Thanks for the report, I have filed [1] to track this issue,<br>
          <br>
          Thanks,<br>
          Vicente<br>
          <br>
          [1] <a href="https://bugs.openjdk.org/browse/JDK-8294020" rel="noreferrer" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://bugs.openjdk.org/browse/JDK-8294020</a><br>
          <br>
          On 9/19/22 09:44, Jaikiran Pai wrote:<br>
          > Please consider this trivial code:<br>
          ><br>
          > public record Record {<br>
          ><br>
          > }<br>
          ><br>
          > Trying to compile this results in:<br>
          ><br>
          > javac Record.java<br>
          ><br>
          > Record.java:1: error: record header expected<br>
          ><br>
          > public record Record {<br>
          >           ^<br>
          ><br>
          > 1 error<br>
          ><br>
          > It isn't too clear what that error message means. It took
          me a while <br>
          > to realize that I had missed using the () after the
          record's name. <br>
          > Changing the source to:<br>
          ><br>
          > public record Record() {<br>
          ><br>
          > }<br>
          ><br>
          > is what the error was trying to convey. Could this error
          message be <br>
          > improved?<br>
          ><br>
          > By the way, notice that the error message was pointing to
          the "r" <br>
          > letter of the "record" keyword with the ^ sign. Is that
          right place <br>
          > for this error or should it have been after the "d" of
          the "Record" <br>
          > name, similar to what appears to be reported for
          constructors of <br>
          > classes, for example:<br>
          ><br>
          > public class Event {<br>
          >     public Event {<br>
          ><br>
          >     }<br>
          > }<br>
          ><br>
          > javac Event.java<br>
          ><br>
          > Event.java:2: error: <identifier> expected<br>
          >     public Event {<br>
          >                       ^<br>
          > 1 error<br>
          ><br>
          > (not sure if mail clients will preserve the spacing -
          that ^ appears <br>
          > between the "t" and the "{")<br>
          ><br>
          > -Jaikiran<br>
          ><br>
          <br>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>