aboutsummaryrefslogtreecommitdiffstats
path: root/tests/pureJava/InnerFieldRef.java
blob: 80d53746829f73cab891be51117165d4d0b13393 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
public class InnerFieldRef {
    private Foo foo = new Foo();

    private static int x;

    public static void main(String[] args) {
	new InnerFieldRef().new Inner().m();
    }
    
    private class Inner {
        public void m() {
            foo.b = true;
	    (new InnerFieldRef()).x = 3;
        }
    }
}

class Foo {
    public boolean b;
}