Background:
The value of a switch expression (call it x ) cannot be null, because x.equals() is used to compare x to the case values. If x is null, this will result in a crash at runtime.
Observed behaviour:
The behaviour of the type checker in...