title: Lists with wildcards cause Generic voodoo error
body: <p>Does anyone know why the following code does not compile? Neither add() nor addAll() works as expected. Removing the "? extends" part makes everything work, but then I would not be able to add subclasses of Foo.</p>
  
  <pre><code> List&lt;? extends Foo&gt; list1 = new ArrayList&lt;Foo&gt;();
   List&lt;? extends Foo&gt; list2 = new ArrayList&lt;Foo&gt;();
  
   /* Won't compile */
   list2.add( new Foo() ); //error 1
   list1.addAll(list2);    //error 2 
  </code></pre>
  
  <p>error 1:</p>
  
  <p>IntelliJ says:</p>
  
  <pre><code>add(capture&lt;? extends Foo&gt;) in List cannot be applied to add(Foo)
  </code></pre>
  
  <p>The compiler says:</p>
  
  <pre><code>cannot find symbol
  symbol  : method addAll(java.util.List&lt;capture#692 of ? extends Foo&gt;)
  location: interface java.util.List&lt;capture#128 of ? extends Foo&gt;
  </code></pre>
  
  <p>error 2: </p>
  
  <p>IntelliJ gives me </p>
  
  <pre><code>addAll(java.util.Collection&lt;? extends capture&lt;? extends Foo&gt;&gt;) in List cannot be applied to addAll(java.util.List&lt;capture&lt;? extends Foo&gt;&gt;)
  </code></pre>
  
  <p>Whereas the compiler just says </p>
  
  <pre><code>cannot find symbol
  symbol  : method addAll(java.util.List&lt;capture#692 of ? extends Foo&gt;)
  location: interface java.util.List&lt;capture#128 of ? extends Foo&gt;
          list1.addAll(list2);
  </code></pre>