inference: proper exceptions thrown checks (IDEA-152577)

This commit is contained in:
Anna Kozlova
2016-03-04 12:19:21 +01:00
parent 09e54999ef
commit 8ff49ddc39
3 changed files with 22 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
import java.io.IOException;
class GenericException {
{
applyFunc(t -> throwsException());
}
private static <T, E extends Exception> void applyFunc(CheckedFunction<T, E> function) {}
private static void throwsException() throws Exception {}
interface CheckedFunction<T, E extends Exception> {
void apply(T t) throws E, IOException;
}
}