Debian Codegraph @

framework/tests/all-systems/java8inference/Issue1815.java

raw
1 // Test case for Issue 1815:
2 // https://github.com/typetools/checker-framework/issues/1815
3
4 import java.util.List;
5 import java.util.stream.Stream;
6
7 @SuppressWarnings("") // just check for crashes
8 abstract class Issue1815 {
9
10 class A extends B {}
11
12 static class B<One extends B<One, Two>, Two extends B.I<One, Two>> {
13 static class I<Three extends B<Three, Four>, Four extends I<Three, Four>> {}
14 }
15
16 abstract A f(Integer x);
17
18 void test(List<Integer> xs) {
19 Stream.of(xs.stream().map(x -> f(x)), xs.stream().map(x -> f(x))).flatMap(stream -> stream);
20 }
21 }