mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
new inference: checked exceptions inference, ensure throws bound are marked as such
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
import java.io.IOException;
|
||||
|
||||
class Test {
|
||||
|
||||
interface B<K, E extends Throwable> {
|
||||
K l(K k) throws E;
|
||||
}
|
||||
|
||||
<R> void bar(B<R, IOException> b) {}
|
||||
|
||||
<E extends Throwable, T> T baz(T l) throws E {
|
||||
return null;
|
||||
}
|
||||
|
||||
{
|
||||
bar(l -> baz(l));
|
||||
bar(this::baz);
|
||||
}
|
||||
}
|
||||
+5
@@ -136,6 +136,11 @@ public class NewLambdaHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
@Bombed(month = Calendar.OCTOBER, day = 30)
|
||||
public void testCheckedExceptionsConstraintsSubstitutions() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
doTest(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user