Tests like the following, where the primitive pattern is not exhaustive on the selector type, are marked as "covering" the selector type erroneously:
jshell> Number n = 42;
n ==> 42
jshell> switch (n) {
...> case int n when n == 0 -> 1;
...> case int n -> -1;
...> }
$22 ==> -1
jshell> Number n = Byte.valueOf((byte)0);
n ==> 0
jshell> switch (n) {
...> case int n when n == 0 -> 1;
...> case int n -> -1;
...> }
| Exception java.lang.MatchException
| at (#24:1)
jshell> Object n = Byte.valueOf((byte)42);
n ==> 42
jshell> switch (n) {
...> case int n when n == 0 -> 1;
...> case int n -> -1;
...> }
| Exception java.lang.MatchException
| at (#29:1)
jshell> Number n = 42;
n ==> 42
jshell> switch (n) {
...> case int n when n == 0 -> 1;
...> case int n -> -1;
...> }
$22 ==> -1
jshell> Number n = Byte.valueOf((byte)0);
n ==> 0
jshell> switch (n) {
...> case int n when n == 0 -> 1;
...> case int n -> -1;
...> }
| Exception java.lang.MatchException
| at (#24:1)
jshell> Object n = Byte.valueOf((byte)42);
n ==> 42
jshell> switch (n) {
...> case int n when n == 0 -> 1;
...> case int n -> -1;
...> }
| Exception java.lang.MatchException
| at (#29:1)