| 1 |
import static java.util.Arrays.asList; |
| 2 |
|
| 3 |
import java.util.List; |
| 4 |
import org.checkerframework.checker.nullness.qual.Nullable; |
| 5 |
|
| 6 |
public class Issue2719 { |
| 7 |
public static void main(String[] args) { |
| 8 |
List<Integer> iList = asList(0); |
| 9 |
List<@Nullable Integer> jList = asList((Integer) null); |
| 10 |
// TODO:: error: (assignment.type.incompatible) |
| 11 |
List<List<Integer>> both = passThrough(asList(iList, jList)); |
| 12 |
System.out.println(both.get(1).get(0).intValue()); |
| 13 |
} |
| 14 |
|
| 15 |
static <T> T passThrough(T object) { |
| 16 |
return object; |
| 17 |
} |
| 18 |
} |