checker/tests/nullness/init/Issue1347.java
raw| 1 | // Test case for Issue 1347. |
| 2 | // https://github.com/typetools/checker-framework/issues/1347 |
| 3 | |
| 4 | class Issue1347<T> { |
| 5 | T t; |
| 6 | T t2; |
| 7 | Object o; |
| 8 | |
| 9 | Issue1347(T t) { |
| 10 | this(t, 0); |
| 11 | } |
| 12 | |
| 13 | Issue1347(T t, int i) { |
| 14 | this.t = t; |
| 15 | this.t2 = t; |
| 16 | this.o = new Object(); |
| 17 | } |
| 18 | |
| 19 | // :: error: (initialization.fields.uninitialized) |
| 20 | Issue1347(T t, String s) { |
| 21 | this.t = t; |
| 22 | this.o = new Object(); |
| 23 | } |
| 24 | } |