captured of non-proper wildcard can't be used as solving bound (IDEA-180042)

This commit is contained in:
Anna.Kozlova
2017-10-12 19:38:49 +02:00
parent f253087643
commit 2f1a299401
2 changed files with 14 additions and 1 deletions
@@ -43,3 +43,14 @@ class Test {
return list.stream().collect(Collectors.toCollection(() -> create()));
}
}
class TestWithNonProperTypeBeforeCapture {
{
Set<? super List<String>> set = foo();
}
private <K> Set<? super List<K>> foo() { //#CAP<? super List<K>> is not proper, can't be used as eq bound
return null;
}
}