Relates :
|
|
Relates :
|
The following program is rejected by javac after the fix for JDK-8078093: === import java.util.concurrent.ExecutorService; abstract class T { void f(ExecutorService s) { s.submit(() -> run(() -> {})); } abstract <E extends Throwable> void run(ThrowableRunnable<E> action) throws E; public interface ThrowableRunnable<T extends Throwable> { void run() throws T; } } === javac full version "9-ea+157" T.java:5: error: incompatible types: inference variable T has incompatible bounds s.submit(() -> run(() -> {})); ^ upper bounds: Object lower bounds: void where T is a type-variable: T extends Object declared in method <T>submit(Callable<T>) 1 error