checker/tests/nullness/jdkannotations/Issue1142.java
raw| 1 | // Issue 1142 https://github.com/typetools/checker-framework/issues/1142 |
| 2 | |
| 3 | import java.util.concurrent.ConcurrentHashMap; |
| 4 | import org.checkerframework.checker.nullness.qual.Nullable; |
| 5 | |
| 6 | class Issue1142 { |
| 7 | |
| 8 | void foo() { |
| 9 | // :: error: (type.argument.type.incompatible) |
| 10 | ConcurrentHashMap<Integer, @Nullable Integer> chm1 = new ConcurrentHashMap<>(); |
| 11 | chm1.put(1, null); |
| 12 | } |
| 13 | } |