mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
new inference: temp solution for inexact method refs
(cherry picked from commit e94cddb696cbcb3e3a8d8e4f62f8903b4bd71403)
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
class Test {
|
||||
interface I<E extends Throwable> {
|
||||
void foo() throws E;
|
||||
}
|
||||
static class Ex extends Exception {}
|
||||
|
||||
<E extends Throwable> void bar(I<E> s) throws E {
|
||||
s.foo();
|
||||
}
|
||||
|
||||
void baz(I<Ex> s) throws Ex {
|
||||
bar(s::foo);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user