aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/test2/SuperCall.java
blob: f1c420278b7875cd6734ef2d95527cd4c2b1bfb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package test2;

class SuperClass {
    public void foo() throws Exception {}
}

public class SuperCall extends SuperClass {
    int i = 0;
    public int bar() throws Exception {
        foo();
        return 1;
    }

    public void foo() throws Exception {
        if (++i > 5)
            throw new Exception("infinite regression?");

        super.foo();
    }
}