X is not applicable for the arguments Y, when X extends Y
<p><strong>EventHandler.java:</strong></p>

<pre><code>public abstract class EventHandler&lt;E&gt; {
    public abstract void HandleEvent(Object sender, E e);
}
</code></pre>

<p><strong>Foo.java:</strong></p>

<pre><code>private OnProgressEventHandler m_OnProgressEventHandler = new OnProgressEventHandler();
private class OnProgressEventHandler extends EventHandler&lt;ProgressEventArgs&gt; {
    public void HandleEvent(Object sender, ProgressEventArgs args) {
        /*...*/
    }
}
</code></pre>

<p><strong>ProgressEventArgs.java:</strong></p>

<pre><code>public class ProgressEventArgs extends EventArgs {
    /*...*/
}
</code></pre>

<p><strong>Bar.java:</strong>  </p>

<pre><code>public void addProgressEventListener(EventHandler&lt;EventArgs&gt; listener) {
    m_OnProgress.addListener(listener);
}
</code></pre>

<p>This line:</p>

<pre><code>myBarObject.addProgressEventListener(m_OnProgressEventHandler); 
</code></pre>

<p>causes:</p>

<blockquote>
  <p>The method addProgressEventListener(EventHandler) in the
  type Bar is not applicable for the arguments (Foo.OnProgressEventHandler)</p>
</blockquote>

<p>I don't understand why it doesn't compile because <code>OnProgressEventHandler</code> extends <code>EventHandler&lt;ProgressEventArgs&gt;</code>. I'm sure it's something trivial I missing, but I cant figure why.</p>
