Debian Codegraph @

checker/tests/nullness/java8inference/InLambda.java

raw
1 class InLambda {
2 static class Mine<T> {
3 @SuppressWarnings("nullness") // just a utility
4 static <S> Mine<S> some() {
5 return null;
6 }
7 }
8
9 interface Function<T, R> {
10 R apply(T t);
11 }
12
13 interface Box<V> {}
14
15 static class Boxes {
16 @SuppressWarnings("nullness") // just a utility
17 static <O> Box<O> transform(Function<String, ? extends O> function) {
18 return null;
19 }
20 }
21
22 class Infer {
23 Box<Mine<Integer>> f =
24 Boxes.transform(
25 el -> {
26 return Mine.some();
27 });
28 }
29 }