new inference: array creation notional method; testdata

(cherry picked from commit dc1b25b74db12a5282332b5bae1d10da1aed99e8)
This commit is contained in:
anna
2013-11-16 20:03:19 +01:00
parent 3c3f917c1e
commit b3d9ff9874
3 changed files with 38 additions and 10 deletions

View File

@@ -0,0 +1,14 @@
class Test {
void test(Helper<Integer> helper) {
staticFactory(helper, Integer[]::new);
}
<P_OUT> void staticFactory(Helper<P_OUT> helper,
IntFunction<P_OUT[]> generator){}
class Helper<K> {}
interface IntFunction<R> {
R apply(int value);
}
}