Support Java 21
mandrean opened this issue · 4 comments
mandrean commented
Currently fails trying to format code with Java 21 features, for example an enhanced switch with a when guard and/or multiple cases collapsed into one branch:
public record Point(int x, int y) {
}
class Cartesian {
static void printQuadrant(Point p) {
switch (p) {
case Point(var x, var y) when x > 0 && y > 0 -> System.out.println("first");
case null, default -> System.out.println("other");
}
}
}
philwebb commented
We'll probably need to upgrade the eclipse version that we shade.
philwebb commented
luccaflower commented
Hi.
Just wanted to report that I had this issue in 0.0.41, and it appears to be resolved in 0.0.42-SNAPSHOT
wilkinsona commented
Thanks, @luccaflower.