-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not create AST on opening AST view #1985
Comments
@noopur2507 there should be a RuntimeException as rootcause, please add its stacktrace |
I can't reproduce (I've tested with Java 21). I assume project compliance is too low. |
I will take a look. |
Just tested in 4.34 and the error happens there so not a regression in this cycle. package nn;
public class ZZ {
public enum Day {
SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY;
}
public void foo(Integer n) {
Day day = Day.MONDAY;
int numLetters = switch (day) {
case MONDAY, FRIDAY, SUNDAY -> {
System.out.println(6);
yield 6;
}
default -> {
throw new IllegalStateException("Invalid day: " + day);
}
};
}
} which led to MethodDeclaration being marked malformed. Java 21 features seems to not be handled that gracefully. |
Isssue comes from call of unsupported . Most likely due to supportedOnlyIn19()->supportedOnlyIn20()->supportedOnlyIn21() changes in NullPattern (e.g. eclipse-jdt/eclipse.jdt.core#627) that haven't been accompanied with corresponding ASTConverter adjustment. |
The text was updated successfully, but these errors were encountered: