JDK-8057919 - Java Issue Tracker
The API does not attempt to produce a string that unambiguously encodes the full type using Class.getName because (a) the class loader information would still ...
The API does not attempt to produce a string that unambiguously encodes the full type using Class.getName because (a) the class loader information would still ...
Test.java:11: error: incompatible types: cannot infer type-variable(s) T,U.type-variable: CAP#1 extends String from capture of ? extends String 1 error. but if the lambda is implicit: e -> e.trim(), it compiles just fine.
- If the return types are unrelated functional interface types (however this is defined -- see JDK-8037804), then the old logic says they're both more specific than the other, and the new logic says neither is more specific. Either way, ambiguity error.
According to 18.5.2, given that isA() returns a bare inference variable ('I') and given that this inference variable has an equality constraints (R) and given that there's no paramaterization of the target type R<N> such that R <: R<N>, eager instantiation of 'I' should occur.
A DESCRIPTION OF THE PROBLEM : When providing a lambda function into a constructor that has a custom consumer interface as a parameter, compiler throws an assertion error. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Compile provided source code.