1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
// This is a test case for issue #105:
// https://github.com/typetools/checker-framework/issues/105
import org.checkerframework.checker.nullness.qual.*;
// :: error: (initialization.static.fields.uninitialized)
public class Uninit12 {
static Object f;
public Uninit12() {
f.toString();
}
static Object g = new Object();
static Object h;
static {
h = new Object();
}
}
class Uninit12_OK {
static Object g = new Object();
static Object h;
static {
h = new Object();
}
}
|