-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b134
-
Verified
This example doesn't compile:
nterface ThrowableRunnable<E extends Throwable> {
void compute() throws E;
}
public abstract class Overloads {
public abstract < E extends Exception> void computeException(ThrowableRunnable<E> process) throws E;
public static <T, E extends Throwable> T compute(ThrowableRunnable<E> action) throws E {
return null;
}
{
computeException(() -> compute(() -> {}));
}
}
nterface ThrowableRunnable<E extends Throwable> {
void compute() throws E;
}
public abstract class Overloads {
public abstract < E extends Exception> void computeException(ThrowableRunnable<E> process) throws E;
public static <T, E extends Throwable> T compute(ThrowableRunnable<E> action) throws E {
return null;
}
{
computeException(() -> compute(() -> {}));
}
}
- relates to
-
JDK-8164587 18.4: Ignore 'Serializable' upper bound for 'throws' ivars
-
- Closed
-