aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new/InitializerWithThrow.java
blob: 589e5f6b0cf3f29db7833e3f5bb9d59551d43b98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import org.aspectj.testing.Tester;

public class InitializerWithThrow {
    public static void main(String[] args) {
        try {
            new InitializerWithThrow();
            Tester.check(false, "no exception");
        } catch (TestException te) {
        }
    }

    static class TestException extends Exception {}

    int i = ini();

    static int ini() throws TestException {
	throw new TestException();
    }

    InitializerWithThrow() throws TestException {}

}