Skip to content

Commit b218577

Browse files
committed
Java: Accept dispatch precision improvement.
1 parent 4434b7b commit b218577

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

java/ql/test/library-tests/switch-default-impossible-dispatch/Test.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static void test(int unknown, int alsoUnknown) {
2525

2626
switch(i) {
2727
case C1 c1 -> { }
28-
case null, default -> i.take(source()); // Can't call C1.take (but we don't currently notice)
28+
case null, default -> i.take(source()); // Can't call C1.take
2929
}
3030

3131
switch(i) {
@@ -55,7 +55,7 @@ case WrapperWrapper(Wrapper(String s)) -> { }
5555

5656
switch(i) {
5757
case C1 c1: break;
58-
case null: default: i.take(source()); // Can't call C1.take (but we don't currently notice)
58+
case null: default: i.take(source()); // Can't call C1.take
5959
}
6060

6161
switch(i) {

java/ql/test/library-tests/switch-default-impossible-dispatch/test.expected

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
| Test.java:23:25:23:32 | source(...) | Test.java:8:65:8:65 | x |
66
| Test.java:23:25:23:32 | source(...) | Test.java:9:74:9:74 | x |
77
| Test.java:23:25:23:32 | source(...) | Test.java:10:82:10:82 | x |
8-
| Test.java:28:36:28:43 | source(...) | Test.java:7:65:7:65 | x |
98
| Test.java:28:36:28:43 | source(...) | Test.java:8:65:8:65 | x |
109
| Test.java:28:36:28:43 | source(...) | Test.java:9:74:9:74 | x |
1110
| Test.java:28:36:28:43 | source(...) | Test.java:10:82:10:82 | x |
@@ -26,7 +25,6 @@
2625
| Test.java:53:25:53:32 | source(...) | Test.java:8:65:8:65 | x |
2726
| Test.java:53:25:53:32 | source(...) | Test.java:9:74:9:74 | x |
2827
| Test.java:53:25:53:32 | source(...) | Test.java:10:82:10:82 | x |
29-
| Test.java:58:34:58:41 | source(...) | Test.java:7:65:7:65 | x |
3028
| Test.java:58:34:58:41 | source(...) | Test.java:8:65:8:65 | x |
3129
| Test.java:58:34:58:41 | source(...) | Test.java:9:74:9:74 | x |
3230
| Test.java:58:34:58:41 | source(...) | Test.java:10:82:10:82 | x |

0 commit comments

Comments
 (0)