JDK-8010303 : Graph inference: missing incorporation step causes spurious inference error
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 8,8-repo-lambda
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-03-19
  • Updated: 2014-04-09
  • Resolved: 2013-03-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8 b84Fixed
Related Reports
Relates :  
Description
This code doesn't compile:

class TestJ8 {

    interface Func<A, B> {
        B f(A a);
    }

    class List<X> {

        <M> List<M> map(Func<X, M> f) {
            return null;
        }

        <A> List<A> apply(final List<Func<X, A>> lf) {
            return null;
        }

        <B, C> List<C> bind(final List<B> lb, final Func<X, Func<B, C>> f) {
            return lb.apply(map(f)); // fails to compile
        }

    }

}


M is inferred as Object, which causes a spurious inference error.
Comments
verified in jdk8 b92
06-06-2013