new overload resolution: block can complete normally if the last statement could throw exception (IDEA-134103)

This commit is contained in:
Anna Kozlova
2014-12-17 20:45:29 +01:00
parent 24a7a43f7c
commit 0be4af00e0
3 changed files with 33 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
import java.io.IOException;
class Test {
{
query(() -> {
process();
});
}
public static void process() throws IOException {}
private <T> void <warning descr="Private method 'query(Test.B<T>)' is never used">query</warning>(B<T> var2) {
System.out.println(var2);
}
private void query( A rch) {
System.out.println(rch);
}
interface A {
void m() throws IOException;
}
interface B<T> {
T n() throws IOException;
}
}