mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
new inference: raise a error when function type was not inferred (supposing well-formed type as free from wildcards)
(cherry picked from commit a9173e822d2aab629265baf295248950e2319e31)
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
interface I<T extends String, V extends List<T>> {
|
||||
T m(V p);
|
||||
}
|
||||
|
||||
void foo(I<? extends String, ? extends List<? extends String>> fip) { }
|
||||
|
||||
void test() {
|
||||
foo(<error descr="Cannot infer functional interface type">(ArrayList<? extends String> p) -> p.get(0)</error>);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user