google / google/google-java-format
Native version fails to format record patterns in switches if the first nested pattern is final
Đang mở
- Ngôn ngữ chính
- Java
- Star
- 6.2k
- Fork
- 937
- Merge trung bình
- 6 phút
- Pull request đã merge (30 ngày)
- 3
Mô tả
The following code fails to format when using the native version of the formatter. (The JVM version works fine.)
```java
class Main {
void test() {
switch (test) {
case Test(final var x, final var y) -> {}
}
}
}
```
On the other hand, both of these examples are accepted:
```java
class Main {
void test() {
switch (test) {
case Test(var x, final var y) -> {}
}
}
}
```
```java
class Main {
void test() {
if (test instanceof Test(final var x, final var y)) {}
}
}
```
Tested on version 1.27.0.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.