title: Pattern matching with unmatching interface does not generate a warning
body: <p>I stumbled across a missing warning when using the pattern matching feature of c#. Usually the compiler is very smart of detecting unreachable code, so I'm wondering why this will not generate a warning:</p>
  
  <pre><code>internal interface IAction{}
  internal class Increment : IAction{}
  internal class Decrement : IAction{}
  internal class DoNothing{}
  
  internal class Program
  {
      private static void Main(string[] args)
      {
          // obviously the following will not compile: 
          // Console.Write(Dispatch(5, new DoNothing()));
          Console.Write(Dispatch(5, new Increment()));
      }
  
      private static int Dispatch(int value, IAction action)
      {
          switch (action)
          {
              case Increment _:
                  return value + 1;
              case Decrement _:
                  return value - 1;
              case DoNothing _: // Not an IAction, will never happen, but no warning is generated
                  return value;
              default:
                  return value;
          }
      }
  }
  </code></pre>