add exception to throws: find functional interface method for method references; discard if in library (IDEA-134468)

This commit is contained in:
Anna Kozlova
2014-12-18 14:13:20 +01:00
parent cd279db9fb
commit 6336e973c9
3 changed files with 54 additions and 24 deletions
@@ -0,0 +1,14 @@
// "Add exception to method signature" "true"
class C {
public static void main(String[] args){
I i = C::foo;
}
class Ex extends Exception {}
static void foo() throws Ex {}
interface I {
void f() throws Ex;
}
}
@@ -0,0 +1,14 @@
// "Add exception to method signature" "true"
class C {
public static void main(String[] args){
I i = C::f<caret>oo;
}
class Ex extends Exception {}
static void foo() throws Ex {}
interface I {
void f();
}
}