aboutsummaryrefslogtreecommitdiffstats
path: root/tests/errors/Const.java
blob: 103e4972ba4c8cb6921121f028ce6c968aec01b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import org.aspectj.testing.*;

public class Const {
    public static void main(String[] args) {
        new Const().realMain(args);
    }
    
    public void realMain(String[] args) {
        int const = 2;
        int i = const * 2;
        Tester.check(false, "shouldn't have compiled");
    }

    public static void testme1() {
        int i = const + 1;
    }

    public static void testme2() {
        int j = Const.const + 1;
    }
}