mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
method refs: prefer unhandled exception to wrong return type error (IDEA-160251)
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
|
||||
import java.util.List;
|
||||
|
||||
class Test {
|
||||
|
||||
@FunctionalInterface
|
||||
interface SomeInterface<T, R> {
|
||||
R someMethod(T val);
|
||||
}
|
||||
|
||||
public <T, R> void consume(SomeInterface<T, R> someInterface) {
|
||||
}
|
||||
|
||||
private List<Integer> produce(Integer val) throws Exception {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void failure() {
|
||||
consume(<error descr="Unhandled exception: java.lang.Exception">this::produce</error>);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user