// Test case for Issue 1815: // https://github.com/typetools/checker-framework/issues/1815 import java.util.List; import java.util.stream.Stream; @SuppressWarnings("") // just check for crashes abstract class Issue1815 { class A extends B {} static class B, Two extends B.I> { static class I, Four extends I> {} } abstract A f(Integer x); void test(List xs) { Stream.of(xs.stream().map(x -> f(x)), xs.stream().map(x -> f(x))).flatMap(stream -> stream); } }