mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
new inference: checked exceptions inference, ensure throws bound are marked as such
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import java.io.IOException;
|
||||
|
||||
class Test {
|
||||
|
||||
interface B<K, E extends Throwable> {
|
||||
K l(K k) throws E;
|
||||
}
|
||||
|
||||
<R> void bar(B<R, IOException> b) {}
|
||||
|
||||
<E extends Throwable, T> T baz(T l) throws E {
|
||||
return null;
|
||||
}
|
||||
|
||||
{
|
||||
bar(l -> baz(l));
|
||||
bar(this::baz);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user