lambda: do not warn about unhandled exceptions from lambda on call site

This commit is contained in:
Anna Kozlova
2012-08-27 15:50:42 +04:00
parent 12858d2795
commit a85c808676
3 changed files with 19 additions and 0 deletions
@@ -0,0 +1,12 @@
import java.io.IOException;
interface Callable<V> {
V call() throws Exception;
}
class Test2 {
static <V> void m(Callable<V> c){}
{
m(() -> {throw new IOException();});
}
}
@@ -99,6 +99,10 @@ public class LambdaHighlightingTest extends LightDaemonAnalyzerTestCase {
doTest();
}
public void testUnhandledException() throws Exception {
doTest();
}
private void doTest() throws Exception {
doTest(BASE_PATH + "/" + getTestName(false) + ".java", false, false);
}