-
Bug
-
Resolution: Fixed
-
P4
-
9
-
b12
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
===
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
- relates to
-
JDK-8182649 Unable to integrate due to compilation error
-
- Resolved
-
-
JDK-8078093 Severe compiler performance regression Java 7 to 8 for nested method invocations
-
- Closed
-