title: Why can't the Java 7 and Eclipse 3.8 compiler compile JDK code with the new Java 7 diamond operator?
body: <pre><code>import java.util.*;
  
  public class SimpleArrays
  {
    @SafeVarargs
    public static &lt;T&gt; List&lt;T&gt; asList( T... a )
    {
      return new ArrayList&lt;&gt;( a );
    }
  }
  </code></pre>
  
  <p><code>asList()</code> is taken from Oracles JDK implementation of java.util.Arrays.</p>
  
  <p>The error is</p>
  
  <pre><code>error: cannot infer type arguments for ArrayList&lt;&gt;
      return new ArrayList&lt;&gt;( a );
  1 error
  </code></pre>
  
  <p>How can this work? Oracle uses the same compiler that we do.</p>