title: "array initializer needs an explicit target-type" - why?
body: <p>Following <a href="http://openjdk.java.net/jeps/286" rel="noreferrer">JEP 286: Local-Variable Type Inference</a> description</p>
  
  <p>I am wondering, what the reason is for introducing such a restriction, as:</p>
  
  <blockquote>
  <pre><code>Main.java:199: error: cannot infer type for local variable k
  
      var k = { 1 , 2 };
          ^   
  (array initializer needs an explicit target-type)
  </code></pre>
  </blockquote>
  
  <p>So for me logically it should be:</p>
  
  <pre><code>var k = {1, 2}; // Infers int[]
  var l = {1, 2L, 3}; // Infers long[]
  </code></pre>
  
  <p>Because Java compiler <strong>can</strong> already infer properly the type of an array:</p>
  
  <pre><code>void decide() {
      arr(1, 2, 3);  // call  void arr(int ...arr)
      arr(1, 2L, 3); // call  void arr(long ...arr)
  }
  
  void arr(int ...arr) {
  }
  
  void arr(long ...arr) {
  }
  </code></pre>
  
  <p>So what is the impediment?</p>