method references with qualifier with captured wildcard type: retrieve upper bound as it is done for method calls

This commit is contained in:
Anna Kozlova
2015-12-30 18:56:58 +01:00
parent e6eca992f0
commit 105f33870f
3 changed files with 22 additions and 1 deletions
@@ -0,0 +1,11 @@
final class Test {
static <T> T create(Iterable<? extends T> iterable) {
return null;
}
public static <T> void testError(Iterable<? extends T> iterable) {
Runnable r = create(iterable)::toString;
}
}