Why is this covariant override permitted if the method is concrete, but not if abstract?
<p>In the following code, <code>MoreSpecificHasInfo.getInfo()</code> is not permitted as an override by the Sun Java 5/6 compilers, saying, "<code>types IHasSpecialInfo and AbstractHasInfo are incompatible; both define getInfo(), but with unrelated return types</code>", although it compiles without error under Eclipse 3.4.2.  Also, if I replace the abstract implementation of <code>getInfo()</code> with the commented concrete version, it compiles fine everywhere.</p>

<p>I'm wondering which (if any) of the Sun or Eclipse compilers are in line with the <a href="http://java.sun.com/docs/books/jls/" rel="nofollow">Java Language Spec</a>, and if the Sun's compiler is correct, why is this not permitted?</p>

<pre><code>interface IInfo {

}

interface ISpecialInfo extends IInfo {

}

interface IHasInfo {

    IInfo getInfo();

}

interface IHasSpecialInfo extends IHasInfo {

    ISpecialInfo getInfo();

}

abstract class AbstractHasInfo implements IHasInfo {

    public abstract AbstractInfo getInfo();

    abstract class AbstractInfo implements IInfo {

    }

}

abstract class MoreSpecificHasInfo extends AbstractHasInfo implements IHasSpecialInfo {

    @Override
    abstract public MoreSpecificInfo getInfo();

    //    @Override
    //    public MoreSpecificInfo getInfo() {
    //        return null;
    //    }

    abstract class MoreSpecificInfo extends AbstractHasInfo.AbstractInfo implements ISpecialInfo {

    }
}
</code></pre>
