Skip to content

Regression in 3.25.9: Cannot be 'abstract' and also 'private'. for a private method in an interface #4331

@famod

Description

@famod

Following (stupid) interface:

public interface Foo {

    default String bar() {
        return "bar" + baz();
    }

    private String baz() {
        return "baz";
    }
}

yields parsing error Cannot be 'abstract' and also 'private'. for the baz() method with 3.25.9, but not with 3.25.8 or earlier.

Parser creation:

    private static JavaParser buildParser() {
        final var config = new ParserConfiguration();
        config.setLanguageLevel(LanguageLevel.JAVA_17);
        return new JavaParser(config);
    }

Maybe caused by https://github.com/javaparser/javaparser/pull/4317/files#diff-ed6e5bb8f3aae72a41d0bea075cc5d3c1c663b1e8aef01100bc22e30ccb24086

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions