Issue 61557
Summary clang-format does not handle array of anonymous inner classes in Java correctly.
Labels clang-format
Assignees
Reporter ZequanWu
    ```
public class A {
    class B {
        int a;
        int b;
    }
 void foo() {
        B[] array = {new B(){{ a = 1; b = 2;}}};
 }
    void bar() {
        foo();
 }
}
```
After:
```
public class A {
    class B {
 int a;
        int b;
    }
    void foo() { 

        B[] array = {new B(){{a = 1;
        b = 2;
 }
}
}
;
}
void bar() {
    foo();
}
}  
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to