the latest commit for ECJ fails to compile this:
public static void main(String[] args) {
CompletableFuture.allOf(Stream.of(1)
.map(value -> future(value))
.toArray(CompletableFuture[]::new));
}
public static <T> CompletableFuture<?> future(T t) {
return null;
}
with the error Type mismatch: cannot convert from CompletableFuture<capture#1-of ?> to CompletableFuture<Object> on future(value) whilst ECJ 2025-09 and javac succeed.
Notably inference does not fail instead the lambda refuses to treat CompletableFuture<capture#1-of ?> as CompletableFuture<Object>.
@stephan-herrmann
the latest commit for ECJ fails to compile this:
with the error
Type mismatch: cannot convert from CompletableFuture<capture#1-of ?> to CompletableFuture<Object>onfuture(value)whilst ECJ 2025-09 and javac succeed.Notably inference does not fail instead the lambda refuses to treat
CompletableFuture<capture#1-of ?>asCompletableFuture<Object>.@stephan-herrmann