File tree Expand file tree Collapse file tree 3 files changed +27
-2
lines changed
java/ql/test/library-tests/guards12 Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -19,5 +19,22 @@ Test.java:
19
19
# 5| 1: [ConstCase] case ...
20
20
# 5| -1: [IntegerLiteral] 2
21
21
# 5| 0: [StringLiteral] "c"
22
- # 6| 2: [DefaultCase] default
23
- # 6| -1: [IntegerLiteral] 3
22
+ # 6| 2: [ConstCase] case ...
23
+ # 6| -1: [IntegerLiteral] 2
24
+ # 6| 0: [StringLiteral] "d"
25
+ # 7| 3: [DefaultCase] default
26
+ # 7| -1: [IntegerLiteral] 3
27
+ # 9| 1: [SwitchStmt] switch (...)
28
+ # 9| -1: [VarAccess] s
29
+ # 10| 0: [ConstCase] case ...
30
+ # 10| -1: [BlockStmt] { ... }
31
+ # 10| 0: [StringLiteral] "a"
32
+ # 10| 1: [StringLiteral] "b"
33
+ # 11| 1: [ConstCase] case ...
34
+ # 11| -1: [BlockStmt] { ... }
35
+ # 11| 0: [StringLiteral] "c"
36
+ # 12| 2: [ConstCase] case ...
37
+ # 12| -1: [BlockStmt] { ... }
38
+ # 12| 0: [StringLiteral] "d"
39
+ # 13| 3: [DefaultCase] default
40
+ # 13| -1: [BlockStmt] { ... }
Original file line number Diff line number Diff line change @@ -3,7 +3,14 @@ void foo(String s) {
3
3
int x = switch (s ) {
4
4
case "a" , "b" -> 1 ;
5
5
case "c" -> 2 ;
6
+ case "d" -> 2 ;
6
7
default -> 3 ;
7
8
};
9
+ switch (s ) {
10
+ case "a" , "b" -> { }
11
+ case "c" -> { }
12
+ case "d" -> { }
13
+ default -> { }
14
+ }
8
15
}
9
16
}
Original file line number Diff line number Diff line change 1
1
| Test.java:5:7:5:17 | case ... | Test.java:3:20:3:20 | s | Test.java:5:12:5:14 | "c" | true | true | Test.java:5:7:5:17 | case ... |
2
+ | Test.java:6:7:6:17 | case ... | Test.java:3:20:3:20 | s | Test.java:6:12:6:14 | "d" | true | true | Test.java:6:7:6:17 | case ... |
You can’t perform that action at this time.
0 commit comments