File tree Expand file tree Collapse file tree 2 files changed +22
-6
lines changed
java/ql/test/library-tests/switch-default-impossible-dispatch Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,14 @@ case WrapperWrapper(Wrapper(String s)) -> { }
66
66
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)
67
67
}
68
68
69
+ switch (i ) {
70
+ case C1 _ , C2 _ when i .toString ().equals ("abc" ):
71
+ i .take (source ()); // Must be either C1.take or C2.take (but we don't currently notice, because neither dominates)
72
+ break ;
73
+ default :
74
+ 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)
75
+ }
76
+
69
77
switch (i ) {
70
78
case C1 _ :
71
79
case C2 _ :
Original file line number Diff line number Diff line change 38
38
| Test.java:66:16:66:23 | source(...) | Test.java:8:65:8:65 | x |
39
39
| Test.java:66:16:66:23 | source(...) | Test.java:9:74:9:74 | x |
40
40
| Test.java:66:16:66:23 | source(...) | Test.java:10:82:10:82 | x |
41
- | Test.java:72:16:72:23 | source(...) | Test.java:7:65:7:65 | x |
42
- | Test.java:72:16:72:23 | source(...) | Test.java:8:65:8:65 | x |
43
- | Test.java:72:16:72:23 | source(...) | Test.java:9:74:9:74 | x |
44
- | Test.java:72:16:72:23 | source(...) | Test.java:10:82:10:82 | x |
45
- | Test.java:75:16:75:23 | source(...) | Test.java:9:74:9:74 | x |
46
- | Test.java:75:16:75:23 | source(...) | Test.java:10:82:10:82 | x |
41
+ | Test.java:71:16:71:23 | source(...) | Test.java:7:65:7:65 | x |
42
+ | Test.java:71:16:71:23 | source(...) | Test.java:8:65:8:65 | x |
43
+ | Test.java:71:16:71:23 | source(...) | Test.java:9:74:9:74 | x |
44
+ | Test.java:71:16:71:23 | source(...) | Test.java:10:82:10:82 | x |
45
+ | Test.java:74:16:74:23 | source(...) | Test.java:7:65:7:65 | x |
46
+ | Test.java:74:16:74:23 | source(...) | Test.java:8:65:8:65 | x |
47
+ | Test.java:74:16:74:23 | source(...) | Test.java:9:74:9:74 | x |
48
+ | Test.java:74:16:74:23 | source(...) | Test.java:10:82:10:82 | x |
49
+ | Test.java:80:16:80:23 | source(...) | Test.java:7:65:7:65 | x |
50
+ | Test.java:80:16:80:23 | source(...) | Test.java:8:65:8:65 | x |
51
+ | Test.java:80:16:80:23 | source(...) | Test.java:9:74:9:74 | x |
52
+ | Test.java:80:16:80:23 | source(...) | Test.java:10:82:10:82 | x |
53
+ | Test.java:83:16:83:23 | source(...) | Test.java:9:74:9:74 | x |
54
+ | Test.java:83:16:83:23 | source(...) | Test.java:10:82:10:82 | x |
You can’t perform that action at this time.
0 commit comments