[java] Fix compile errors after merge
This commit is contained in:
@ -1743,7 +1743,7 @@ void TypePattern():
|
||||
}
|
||||
|
||||
void RecordPattern():
|
||||
{ checkForRecordPatterns(); }
|
||||
{}
|
||||
{
|
||||
ReferenceType() RecordStructurePattern() [ VariableDeclaratorId() ]
|
||||
}
|
||||
@ -2476,7 +2476,6 @@ void CaseLabelElement(ASTSwitchLabel label) #void:
|
||||
void Guard() #SwitchGuard:
|
||||
{
|
||||
Token t;
|
||||
checkForGuard();
|
||||
}
|
||||
{
|
||||
t = <IDENTIFIER> {
|
||||
|
@ -19,17 +19,13 @@ import net.sourceforge.pmd.annotation.Experimental;
|
||||
* @see <a href="https://openjdk.org/jeps/405">JEP 405: Record Patterns (Preview)</a>
|
||||
*/
|
||||
@Experimental
|
||||
public final class ASTComponentPatternList extends AbstractJavaNode {
|
||||
public final class ASTComponentPatternList extends ASTList<ASTPattern> {
|
||||
ASTComponentPatternList(int id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
ASTComponentPatternList(JavaParser p, int id) {
|
||||
super(p, id);
|
||||
super(id, ASTPattern.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object jjtAccept(JavaParserVisitor visitor, Object data) {
|
||||
protected <P, R> R acceptVisitor(JavaVisitor<? super P, ? extends R> visitor, P data) {
|
||||
return visitor.visit(this, data);
|
||||
}
|
||||
}
|
||||
|
@ -26,13 +26,8 @@ public final class ASTRecordPattern extends AbstractJavaNode implements ASTPatte
|
||||
super(id);
|
||||
}
|
||||
|
||||
ASTRecordPattern(JavaParser p, int id) {
|
||||
super(p, id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object jjtAccept(JavaParserVisitor visitor, Object data) {
|
||||
protected <P, R> R acceptVisitor(JavaVisitor<? super P, ? extends R> visitor, P data) {
|
||||
return visitor.visit(this, data);
|
||||
}
|
||||
|
||||
|
@ -25,13 +25,8 @@ public final class ASTSwitchGuard extends AbstractJavaNode {
|
||||
super(id);
|
||||
}
|
||||
|
||||
ASTSwitchGuard(JavaParser p, int id) {
|
||||
super(p, id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object jjtAccept(JavaParserVisitor visitor, Object data) {
|
||||
protected <P, R> R acceptVisitor(JavaVisitor<? super P, ? extends R> visitor, P data) {
|
||||
return visitor.visit(this, data);
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ import net.sourceforge.pmd.lang.java.JavaParsingHelper;
|
||||
|
||||
public class Java19PreviewTreeDumpTest extends BaseTreeDumpTest {
|
||||
private final JavaParsingHelper java19p =
|
||||
JavaParsingHelper.WITH_PROCESSING.withDefaultVersion("19-preview")
|
||||
JavaParsingHelper.DEFAULT.withDefaultVersion("19-preview")
|
||||
.withResourceContext(Java19PreviewTreeDumpTest.class, "jdkversiontests/java19p/");
|
||||
private final JavaParsingHelper java19 = java19p.withDefaultVersion("19");
|
||||
|
||||
|
Reference in New Issue
Block a user