field_access_on_returned_value.mj 252 Bytes
Newer Older
Christian Schnorr's avatar
Christian Schnorr committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
class Main {
    public static void main(String[] arguments) {
        Main main = new Main();
        main.getX().x = null;

        new Main().getX().x = null;
    }

    public X getX() {
        return new X();
    }
}

class X {
    public X x;
}