new inference: checked exceptions inference, ensure throws bound are marked as such

This commit is contained in:
Anna Kozlova
2014-09-16 14:03:52 +04:00
parent 0261ad4164
commit 5e79028c99
5 changed files with 38 additions and 8 deletions

View File

@@ -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);
}
}