| 1 |
// Partial test case for issue #1330: https://github.com/typetools/checker-framework/issues/1330 |
| 2 |
// This should be expanded to include all the cases in the issue. |
| 3 |
|
| 4 |
// @skip-test until we fix the issue |
| 5 |
|
| 6 |
import java.util.TreeSet; |
| 7 |
import org.checkerframework.checker.nullness.qual.Nullable; |
| 8 |
|
| 9 |
class TreeSetTest { |
| 10 |
|
| 11 |
public static void main(String[] args) { |
| 12 |
|
| 13 |
// :: error: (type.argument.type.incompatible) |
| 14 |
TreeSet<@Nullable Integer> ts = new TreeSet<>(); |
| 15 |
|
| 16 |
// This throws a null pointer exception |
| 17 |
ts.add(null); |
| 18 |
} |
| 19 |
} |