You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cat > a.java <<'EOL'
public sealed interface A {
record AA(Long a) implements A {}
record AAA(String b) implements A {}
static Long mySwitch(A a) {
switch (a) {
case AA(var aa) -> {
return aa;
}
case AAA(var b) -> {
return Long.parseLong(b);
}
}
}
}
EOL
java -jar google-java-format-1.19.1-all-deps.jar -r a.java
a.java:6:22: error: expected token: 'var'; generated aa instead
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: