title: Wrong type interference in tuples (rest and spread expressions)
body: <p>I'm playing with new capabilities in Typescript 3.0 (I'm using 3.1.0-dev.20180717) and found strange behavior with generic types.</p>
  
  <pre><code>type Head&lt;T extends any[]&gt; = T[0];
  type Tail&lt;T extends any[]&gt; = ((...t: T) =&gt; 0) extends ((a: any, ...r: infer R) =&gt; 0) ? R : never;
  type Prepend&lt;A extends any, B extends any[]&gt; = ((a: A, ...r: B) =&gt; 0) extends ((...r: infer T) =&gt; 0) ? T : never;
  type Combine&lt;T extends any[]&gt; = Prepend&lt;Head&lt;T&gt;, Tail&lt;T&gt;&gt;
  
  type test1 = Head&lt;[1, 2, 3, 4]&gt;; // 1 ✔️
  type test2 = Tail&lt;[1, 2, 3, 4]&gt;; // [2, 3, 4] ✔️
  type test3 = Prepend&lt;1, [2, 3, 4]&gt;; // [1, 2, 3, 4] ✔️
  type test4 = Prepend&lt;Head&lt;[1, 2, 3, 4]&gt;, Tail&lt;[1, 2, 3, 4]&gt;&gt; // [1, 2, 3, 4] ✔️
  type test5 = Combine&lt;[1, 2, 3, 4]&gt;; // [1, ...any[]] ❌
  </code></pre>
  
  <p>I was expecting, that <code>test5</code> will have type <code>[1, 2, 3, 4]</code>, because it's same case as in <code>test4</code> but wrapped in <code>Combine&lt;T&gt;</code> generic type. Am I missing something?</p>