mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Add tests for the combination of anonymous labels and a guard
This commit is contained in:
@@ -66,6 +66,14 @@ public class Test {
|
||||
i.take(source()); // Can't call C1.take or C2.take (but we don't currently notice, because a multi-pattern case isn't understood as a type test)
|
||||
}
|
||||
|
||||
switch(i) {
|
||||
case C1 _, C2 _ when i.toString().equals("abc"):
|
||||
i.take(source()); // Must be either C1.take or C2.take (but we don't currently notice, because neither dominates)
|
||||
break;
|
||||
default:
|
||||
i.take(source()); // Can't call C1.take or C2.take (but we don't currently notice, because a multi-pattern case isn't understood as a type test)
|
||||
}
|
||||
|
||||
switch(i) {
|
||||
case C1 _:
|
||||
case C2 _:
|
||||
|
||||
@@ -38,9 +38,17 @@
|
||||
| Test.java:66:16:66:23 | source(...) | Test.java:8:65:8:65 | x |
|
||||
| Test.java:66:16:66:23 | source(...) | Test.java:9:74:9:74 | x |
|
||||
| Test.java:66:16:66:23 | source(...) | Test.java:10:82:10:82 | x |
|
||||
| Test.java:72:16:72:23 | source(...) | Test.java:7:65:7:65 | x |
|
||||
| Test.java:72:16:72:23 | source(...) | Test.java:8:65:8:65 | x |
|
||||
| Test.java:72:16:72:23 | source(...) | Test.java:9:74:9:74 | x |
|
||||
| Test.java:72:16:72:23 | source(...) | Test.java:10:82:10:82 | x |
|
||||
| Test.java:75:16:75:23 | source(...) | Test.java:9:74:9:74 | x |
|
||||
| Test.java:75:16:75:23 | source(...) | Test.java:10:82:10:82 | x |
|
||||
| Test.java:71:16:71:23 | source(...) | Test.java:7:65:7:65 | x |
|
||||
| Test.java:71:16:71:23 | source(...) | Test.java:8:65:8:65 | x |
|
||||
| Test.java:71:16:71:23 | source(...) | Test.java:9:74:9:74 | x |
|
||||
| Test.java:71:16:71:23 | source(...) | Test.java:10:82:10:82 | x |
|
||||
| Test.java:74:16:74:23 | source(...) | Test.java:7:65:7:65 | x |
|
||||
| Test.java:74:16:74:23 | source(...) | Test.java:8:65:8:65 | x |
|
||||
| Test.java:74:16:74:23 | source(...) | Test.java:9:74:9:74 | x |
|
||||
| Test.java:74:16:74:23 | source(...) | Test.java:10:82:10:82 | x |
|
||||
| Test.java:80:16:80:23 | source(...) | Test.java:7:65:7:65 | x |
|
||||
| Test.java:80:16:80:23 | source(...) | Test.java:8:65:8:65 | x |
|
||||
| Test.java:80:16:80:23 | source(...) | Test.java:9:74:9:74 | x |
|
||||
| Test.java:80:16:80:23 | source(...) | Test.java:10:82:10:82 | x |
|
||||
| Test.java:83:16:83:23 | source(...) | Test.java:9:74:9:74 | x |
|
||||
| Test.java:83:16:83:23 | source(...) | Test.java:10:82:10:82 | x |
|
||||
|
||||
Reference in New Issue
Block a user