Issue #8267: Implement full records support#8422
Conversation
Possibly affected checks |
cf85009 to
d52227b
Compare
|
@nmancus1 please fix ACL for the regression reports. Some of them are inaccessible. |
esilkensen
left a comment
There was a problem hiding this comment.
Nice, I think this worked out really well splitting it into two PR's
|
Hi @rnveach, friendly ping for this PR - if it looks good to you, would be great to get it merged so @nmancus1 can have a clean base to build from for the follow-up PR's addressing the affects checks. |
d52227b to
d6ef3bc
Compare
|
from JEP:
please create such input.
Please put in Input different(all possible) modifiers for CompactConstructorDeclaration. |
d6ef3bc to
98bc4c0
Compare
From JLS: The compact constructor must be declared public.
I'm not sure if you're referring to compact constructors, but if so: From JLS: It is a compile-time error if a record declaration contains more than one compact constructor declaration. |
|
please fix indentation of they should not be indented, in separate commit of this PR or separate PR |
| * The {@code record} keyword. This element appears | ||
| * as part of a record declaration. | ||
| * | ||
| * @since 8.35 |
There was a problem hiding this comment.
8.35 was just released so this needs to be upped to 36
There was a problem hiding this comment.
This was added in 8.35 with the preliminary record support. Should I make this a separate PR or commit?
There was a problem hiding this comment.
Sorry, didn't make the connection.
Issue #8267: Implement full records support
This PR will add full support for the Java 14 records syntax.
From JEP:
Java Grammar
RecordDeclaration:
{ClassModifier}
recordTypeIdentifier [TypeParameters]RecordHeader [SuperInterfaces] RecordBody
RecordHeader:
([RecordComponentList])RecordComponentList:
RecordComponent {
,RecordComponent}RecordComponent:
{Annotation} UnannType Identifier
VariableArityRecordComponent
VariableArityRecordComponent:
{Annotation} UnannType {Annotation}
...IdentifierRecordBody:
{{RecordBodyDeclaration}}RecordBodyDeclaration:
ClassBodyDeclaration
CompactConstructorDeclaration
CompactConstructorDeclaration:
{Annotation} {ConstructorModifier} SimpleTypeName ConstructorBody
Note that I've taken some liberties with the java grammar, in order to reuse existing code and reduce extraneous rules in the grammar file.
Reviewers, please note that the commits from #8293 are temporarily on this PR, since I built from them. Once #8293 is merged, I will rebase.