-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 8, 9
-
Component/s: tools
-
b148
-
Verified
This program fails to compile:
interface CheckedSupplier<T extends Throwable, R> {
R get() throws T;
static <T extends Throwable, R> CheckedSupplier<T, R> checked(CheckedSupplier<T, R> checkedSupplier) {
return checkedSupplier;
}
static void main(String[] args) {
checked(() -> null).get();
}
}
interface CheckedSupplier<T extends Throwable, R> {
R get() throws T;
static <T extends Throwable, R> CheckedSupplier<T, R> checked(CheckedSupplier<T, R> checkedSupplier) {
return checkedSupplier;
}
static void main(String[] args) {
checked(() -> null).get();
}
}