title: Why doesn't the diamond operator work within a addAll() call in Java 7?
body: <p>Given this example from <a href="http://download.oracle.com/javase/tutorial/java/generics/gentypeinference.html#type-inference-instantiation" rel="noreferrer">the generics tutorial</a>.</p>
  
  <pre><code>List&lt;String&gt; list = new ArrayList&lt;&gt;();
  list.add("A");
  
  // The following statement should fail since addAll expects
  // Collection&lt;? extends String&gt;
  
  list.addAll(new ArrayList&lt;&gt;());
  </code></pre>
  
  <p>Why does the last line not compile, when it seems it should compile. The first line uses a very similar construct and compiles without a problem.</p>
  
  <p>Please explain elaborately.</p>