mirror of
https://github.com/github/codeql.git
synced 2025-12-22 19:56:32 +01:00
Note we can't prove certain unreachable callables when 'case null' is present
This commit is contained in:
@@ -25,7 +25,7 @@ public class Test {
|
|||||||
|
|
||||||
switch(i) {
|
switch(i) {
|
||||||
case C1 c1 -> { }
|
case C1 c1 -> { }
|
||||||
case null, default -> i.take(source()); // Can't call C1.take
|
case null, default -> i.take(source()); // Can't call C1.take (but we don't currently notice)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(i) {
|
switch(i) {
|
||||||
@@ -53,6 +53,11 @@ public class Test {
|
|||||||
default -> i.take(source()); // Could call any implementation, because this might be a WrapperWrapper(Wrapper((Integer)) for example.
|
default -> i.take(source()); // Could call any implementation, because this might be a WrapperWrapper(Wrapper((Integer)) for example.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch(i) {
|
||||||
|
case C1 c1: break;
|
||||||
|
case null: default: i.take(source()); // Can't call C1.take (but we don't currently notice)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
| Test.java:23:25:23:32 | source(...) | Test.java:8:65:8:65 | x |
|
| Test.java:23:25:23:32 | source(...) | Test.java:8:65:8:65 | x |
|
||||||
| Test.java:23:25:23:32 | source(...) | Test.java:9:74:9:74 | x |
|
| Test.java:23:25:23:32 | source(...) | Test.java:9:74:9:74 | x |
|
||||||
| Test.java:23:25:23:32 | source(...) | Test.java:10:82:10:82 | x |
|
| Test.java:23:25:23:32 | source(...) | Test.java:10:82:10:82 | x |
|
||||||
|
| Test.java:28:36:28:43 | source(...) | Test.java:7:65:7:65 | x |
|
||||||
| Test.java:28:36:28:43 | source(...) | Test.java:8:65:8:65 | x |
|
| Test.java:28:36:28:43 | source(...) | Test.java:8:65:8:65 | x |
|
||||||
| Test.java:28:36:28:43 | source(...) | Test.java:9:74:9:74 | x |
|
| Test.java:28:36:28:43 | source(...) | Test.java:9:74:9:74 | x |
|
||||||
| Test.java:28:36:28:43 | source(...) | Test.java:10:82:10:82 | x |
|
| Test.java:28:36:28:43 | source(...) | Test.java:10:82:10:82 | x |
|
||||||
@@ -25,3 +26,7 @@
|
|||||||
| Test.java:53:25:53:32 | source(...) | Test.java:8:65:8:65 | x |
|
| Test.java:53:25:53:32 | source(...) | Test.java:8:65:8:65 | x |
|
||||||
| Test.java:53:25:53:32 | source(...) | Test.java:9:74:9:74 | x |
|
| Test.java:53:25:53:32 | source(...) | Test.java:9:74:9:74 | x |
|
||||||
| Test.java:53:25:53:32 | source(...) | Test.java:10:82:10:82 | x |
|
| Test.java:53:25:53:32 | source(...) | Test.java:10:82:10:82 | x |
|
||||||
|
| Test.java:58:34:58:41 | source(...) | Test.java:7:65:7:65 | x |
|
||||||
|
| Test.java:58:34:58:41 | source(...) | Test.java:8:65:8:65 | x |
|
||||||
|
| Test.java:58:34:58:41 | source(...) | Test.java:9:74:9:74 | x |
|
||||||
|
| Test.java:58:34:58:41 | source(...) | Test.java:10:82:10:82 | x |
|
||||||
|
|||||||
Reference in New Issue
Block a user