title: Why does switch infer an object to `never` (after exhausting all possibilities) only when assessing an union type, but not a regular interface?
body: <p>Why isn't the inference consistent between the following examples? <a href="https://www.typescriptlang.org/play?ssl=24&amp;ssc=1&amp;pln=2&amp;pc=1#code/FAFwngDgpgBAKgRhgXhgbxuaAuGCA0MAJgIYgm4Dkp5ClMAvjAD7qaRS4BMhNFM1MiS70mwYADMArgDsAxiACWAexmYoAZxBcAFMoBGAKygLciAJTpgMGzA0B3RSDkALPUZMgAdFiiW01rZBciQasAjYgUE2IWEwXJHRSTAATlAgUikyUdFEUBIkUgA2ILg5yTByqhrKRVBeUCkpyinuxgpefJYA9N2YLs32GjCNzSkwALTs0MoSMAbtICgwMlAAbo05DMDboBzwXMsYvrgExEJUfKLi0vJKqupaCG2eZlz+OQ5Ori8dvh8VWLhRIVWxpDJZcq2PIFYqlGBQpJVGQ1OoNJotX7eLowXrTKCzeYeBTLRAwLwUmD2FxgAD8Wx2wCAA" rel="nofollow noreferrer"><strong>Playground link</strong></a></p>
  <pre class="lang-js prettyprint-override"><code>type T1 = { type: 1, data: 'data1' } | { type: 2, data: 'data2' } 
  
  function test1(object: T1) {
      switch(object.type) {
          case 1:
          case 2:
              return
          default: 
              console.error(object.data) // throws error - typeof object = never
      }
  }
  
  type T2 = { type: 1, data: 'data' }
  
  function test2(object: T2) {
      switch(object.type) {
          case 1:
              return
          default: 
              console.error(object.data) // doesn't throw - typeof object = T1 ... why?
      }
  }
  </code></pre>
  <p>I would expect test2 to also be infered as never and throw, since there is no shape <code>object</code> can possibly take... but it doesn't.</p>
  <p>What gives?</p>