Skip to content

Commit 956f1d8

Browse files
committed
Cover the other bodies that can hold only semicolons
Interfaces, enums, records, annotation types and anonymous classes go through the same member-list code as classes, so the fix covers them too; the golden pins that, together with two semicolons in a row, a comment after the opening brace, and a semicolon in front of a real member, which took the existing path all along.
1 parent a1b84fb commit 956f1d8

2 files changed

Lines changed: 49 additions & 0 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
interface B { ; }
2+
enum C { X; ; }
3+
record R(int a) { ; }
4+
class E { ;; }
5+
class F { Object o = new Object() { ; }; }
6+
class G { // comment
7+
;
8+
}
9+
@interface H { ; }
10+
class I {
11+
;
12+
int x;
13+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
interface B {
2+
;
3+
}
4+
5+
enum C {
6+
X;
7+
;
8+
}
9+
10+
record R(int a) {
11+
;
12+
}
13+
14+
class E {
15+
;
16+
;
17+
}
18+
19+
class F {
20+
Object o = new Object() {
21+
;
22+
};
23+
}
24+
25+
class G { // comment
26+
;
27+
}
28+
29+
@interface H {
30+
;
31+
}
32+
33+
class I {
34+
;
35+
int x;
36+
}

0 commit comments

Comments
 (0)