method reference: ignore already handled exceptions (IDEA-137694)

This commit is contained in:
Anna Kozlova
2015-03-18 14:09:58 +01:00
parent 4ba0890182
commit dd1b0c2796
3 changed files with 32 additions and 41 deletions
@@ -0,0 +1,14 @@
import java.io.IOException;
class MethodReferenceErrorHighlight {
{
match(String.class, this::foo);
}
<P> void match(final Class<P> type, UnitApply<P> apply) {}
void foo(String s) throws IOException { throw new IOException(); }
}
interface UnitApply<I> {
void apply(I i) throws Exception;
}