java inference: tolerate raw upper bound (IDEA-229998)

GitOrigin-RevId: 90a888a80d9bd304fa908e5ae10a52ecc639752d
This commit is contained in:
Anna Kozlova
2021-05-05 22:35:23 +02:00
committed by intellij-monorepo-bot
parent 50c060dd5d
commit 8ccd8d71e4
3 changed files with 13 additions and 4 deletions

View File

@@ -0,0 +1,10 @@
import java.util.List;
class MyTest {
void m(List<? extends Bar> bars) {
n(bars.get(0));
bars.forEach(b -> n(b));
bars.forEach(MyTest::n);
}
private static <T> void n(Bar<T> bar) { }
private static class Bar<T> { }
}