summaryrefslogtreecommitdiff
path: root/output/negative/TrickyOverload-error2.java
blob: ee5162698c77de192971967414a6601b0cfd9e7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class Overloading {
    public static void main(String[] args) {
        System.out.println(new A().init());
    }
}

class A {
    public int init() {
        return 0;
    }

    public int x(B a) {
        return 1;
    }
}

class B extends A {
    public int x(A a) {
        return 2;
    }
}