JDK-8235446 : confusing error message for records with no parens
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-12-05
  • Updated: 2019-12-13
  • Resolved: 2019-12-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 14
14 b27Fixed
Related Reports
Relates :  
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"
Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/5f73126dc390 User: vromero Date: 2019-12-06 19:23:46 +0000
06-12-2019