aboutsummaryrefslogtreecommitdiffstats
path: root/tests/pureJava/SuperIsWeird.java
blob: e1f7119e90fe05abbd64fade9a81de5234d09b9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class Super {
    static void goo() {}
    static int getInt() { return 42; }
}

public class SuperIsWeird extends Super {
    static void foo0() {
        super.goo();  // error
    }

    void foo1() {
        Object o = super; // error
    }

    void foo2() {
        super.goo(); // no error
    }

    static int v0 = super.getInt(); // error
    Object v1 = super; // error
    int v2 = super.getInt(); // no error
}