google / google/google-java-format
Native version fails to format record patterns in switches if the first nested pattern is final
オープン
- 主要言語
- Java
- スター
- 6.2k
- フォーク
- 937
- 平均マージ
- 6分
- マージ済み PR(30日)
- 3
説明
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.
コントリビューションガイド
評価
この issue はまだ評価されていません。