| 1 |
// Test case for Issue 1044 |
| 2 |
// https://github.com/typetools/checker-framework/issues/1044 |
| 3 |
|
| 4 |
import org.checkerframework.checker.nullness.qual.NonNull; |
| 5 |
import org.checkerframework.checker.nullness.qual.Nullable; |
| 6 |
|
| 7 |
public class Issue1044 { |
| 8 |
// :: error: (initialization.fields.uninitialized) |
| 9 |
static class Inner1<V> { |
| 10 |
V f; |
| 11 |
} |
| 12 |
|
| 13 |
// :: error: (initialization.fields.uninitialized) |
| 14 |
static class Inner2<@Nullable T extends @Nullable Object> { |
| 15 |
@NonNull T f; |
| 16 |
} |
| 17 |
|
| 18 |
static class Inner3<V> { |
| 19 |
V f; |
| 20 |
// :: error: (initialization.fields.uninitialized) |
| 21 |
Inner3() {} |
| 22 |
} |
| 23 |
|
| 24 |
static class Inner4<@Nullable T extends @Nullable Object> { |
| 25 |
@NonNull T f; |
| 26 |
// :: error: (initialization.fields.uninitialized) |
| 27 |
Inner4() {} |
| 28 |
} |
| 29 |
|
| 30 |
static class Inner5<V> { |
| 31 |
@Nullable V f; |
| 32 |
} |
| 33 |
|
| 34 |
static class Inner6<@Nullable T extends @Nullable Object> { |
| 35 |
T f; |
| 36 |
} |
| 37 |
|
| 38 |
static class Inner7<V> { |
| 39 |
@Nullable V f; |
| 40 |
|
| 41 |
Inner7() {} |
| 42 |
} |
| 43 |
|
| 44 |
static class Inner8<@Nullable T extends @Nullable Object> { |
| 45 |
T f; |
| 46 |
|
| 47 |
Inner8() {} |
| 48 |
} |
| 49 |
|
| 50 |
// :: error: (initialization.fields.uninitialized) |
| 51 |
static class Inner9<V extends Object> { |
| 52 |
V f; |
| 53 |
} |
| 54 |
|
| 55 |
static class Inner10<V extends Object> { |
| 56 |
V f; |
| 57 |
// :: error: (initialization.fields.uninitialized) |
| 58 |
Inner10() {} |
| 59 |
} |
| 60 |
|
| 61 |
static class Inner11<V extends Object> { |
| 62 |
@Nullable V f; |
| 63 |
} |
| 64 |
|
| 65 |
static class Inner12<V extends Object> { |
| 66 |
@Nullable V f; |
| 67 |
|
| 68 |
Inner12() {} |
| 69 |
} |
| 70 |
} |