mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 18:28:55 +07:00
new overload resolution: block can complete normally if the last statement could throw exception (IDEA-134103)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user