| 1 |
// Test case for #953 |
| 2 |
// https://github.com/typetools/checker-framework/issues/953 |
| 3 |
|
| 4 |
import java.util.ArrayList; |
| 5 |
import java.util.List; |
| 6 |
import java.util.function.Function; |
| 7 |
import org.checkerframework.checker.nullness.qual.NonNull; |
| 8 |
|
| 9 |
@SuppressWarnings("") |
| 10 |
class Issue953bLambda { |
| 11 |
private static List<List<?>> strs = new ArrayList<>(); |
| 12 |
|
| 13 |
public static <R, T> List<@NonNull R> mapList( |
| 14 |
List<@NonNull T> list, Function<@NonNull T, @NonNull R> func) { |
| 15 |
throw new RuntimeException(); |
| 16 |
} |
| 17 |
|
| 18 |
public static void test() { |
| 19 |
List<String> list = |
| 20 |
mapList( |
| 21 |
strs, |
| 22 |
s -> { |
| 23 |
return ""; |
| 24 |
}); |
| 25 |
} |
| 26 |
} |