aboutsummaryrefslogtreecommitdiffstats
path: root/tests/errors/ExplicitConstructorThrows.java
blob: 09474f7034df95c5dce060640dd2b9150f842933 (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
import java.io.IOException;

public class ExplicitConstructorThrows extends Base { //ERR: default constructor throws IOException
}

class Base {
    Base() throws IOException { }
}

class Sub1 extends Base {
    Sub1() {
        super(); //ERR: throws IOException
    }
}

class Sub2 extends Base {
    Sub2(String s) {
        this();  //ERR: throws IOException
    }

    Sub2() throws IOException {
        super();
    }
}