mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-11 11:36:59 +07:00
checked exception constraints: ensure ground type (IDEA-173200)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import java.io.IOException;
|
||||
import java.io.UncheckedIOException;
|
||||
import java.util.function.Function;
|
||||
|
||||
class Main {
|
||||
public static void main(String[] args) {
|
||||
runTest(Main::test, UncheckedIOException:: new);
|
||||
}
|
||||
|
||||
private static void test() throws IOException {}
|
||||
|
||||
private static <E extends Throwable> void runTest(A<? extends E> a, Function<E, ?> b) { }
|
||||
|
||||
@FunctionalInterface
|
||||
public interface A<E extends Throwable> {
|
||||
void foo() throws E;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user