method ref: don't check method reference qualifier against functional interface (IDEA-141343)

This commit is contained in:
Anna Kozlova
2015-06-11 16:02:01 +03:00
parent d4b8045556
commit 74f9ac5a46
3 changed files with 26 additions and 7 deletions

View File

@@ -0,0 +1,17 @@
class E1 extends Exception {}
class E2 extends Exception {}
class Test {
interface I {
void m() throws E1;
}
void a(I i) {}
Test b() throws E2 {return this;}
void c() throws E1 {}
void e() throws E1, E2 {}
void d() throws E2 {
a(b()::c);
a(<error descr="Unhandled exception: E2">this::e</error>);
}
}