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

class Super {
    Super(Object o){}
}

/** windows treats filename "nul" specially, like /dev/null on unix */
public class NulIOException extends Super {

    public static void main(String[] args) {
        Object o = new NulIOException(nul); // parms: IOException
        Tester.check(false, "expecting compiler error");
        Object p = nul; // reference: expect CE here, not IOException
    }

    NulIOException() { super(nul); }

    // super parms: expect CE here, not IOException 
    NulIOException(Object o) { super(o); }
    // don't attempt to read nul on windows
}