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:
anna
2013-11-25 16:48:23 +01:00
parent 24cd3f09fd
commit 912722b922
4 changed files with 22 additions and 1 deletions
@@ -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>);
}
}