title: incompatible types: SomeX cannot be converted to CAP#1
body: <p>I can't grasp what is wrong here</p>
  
  <pre><code>import java.util.*;
  
  class Main {
      private static class SomeX {}
  
      void doSomethingWithX(SomeX someX) {
          Collection&lt;? extends SomeX&gt; colectionOfX = new ArrayList&lt;&gt;();
          colectionOfX.add(someX);
      }
  }
  </code></pre>
  
  <p><code>javac</code> says following:</p>
  
  <blockquote>
  <pre><code>  Main.java:8: error: method add in interface Collection&lt;E&gt; cannot be applied to given types;
            colectionOfX.add(someX);
                        ^
      required: CAP#1
      found: SomeX
      reason: argument mismatch; SomeX cannot be converted to CAP#1
      where E is a type-variable:
        E extends Object declared in interface Collection
      where CAP#1 is a fresh type-variable:
        CAP#1 extends SomeX from capture of ? extends SomeX
  </code></pre>
  </blockquote>
  
  <p>To my understanding <code>extends</code> limits the lower bound of CAP#1 to <code>SomeX</code> and <code>SomeX</code> itself should satisfy the limit.</p>
  
  <p>What's wrong? (Compiled with <code>javac 1.8.0_102</code>)</p>