Forbid type params for record ctors

This commit is contained in:
Clément Fournier
2020-03-28 11:42:16 +01:00
parent 17ddfd2a22
commit e1a4b8ae97
2 changed files with 1 additions and 3 deletions

View File

@ -1160,7 +1160,7 @@ void RecordBodyDeclaration() #void :
private void RecordCtorLookahead() #void:
{}
{
Modifiers() [ TypeParameters() ] <IDENTIFIER> ("throws" | "{")
Modifiers() <IDENTIFIER> "{"
}
void RecordConstructorDeclaration():
@ -1169,7 +1169,6 @@ void RecordConstructorDeclaration():
}
{
modifiers = Modifiers() { jjtThis.setModifiers(modifiers); }
[TypeParameters()]
<IDENTIFIER> { jjtThis.setImage(token.image); }
Block()
}

View File

@ -14,7 +14,6 @@ import net.sourceforge.pmd.annotation.Experimental;
*
* RecordConstructorDeclaration ::= ({@linkplain ASTAnnotation Annotation})*
* RecordModifiers
* {@linkplain ASTTypeParameters TypeParameters}?
* &lt;IDENTIFIER&gt;
* {@link ASTBlock Block}
*