blob: 0f29c1303710e05a2bb0fba249e36c3d1e565bdf (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
/* intertype method declarations should be a static context;
it is incorrect to refer to instance variables of the
originating aspect. ajc fails to check this properly when
an ITD method is applied to an inner class.
The example below compiles fine, but then throws
java.lang.NoSuchFieldError: zzz
when run.
*/
aspect NewFoo {
int zzz = 3;
public void Aaa.Ccc.bar() {
System.out.println(zzz); // CE L19: illegal reference to zzz
}
}
class Aaa {
public class Ccc {
}
public Ccc ccc;
public Aaa() {
ccc = new Ccc();
}
}
class IllegalRef {
public static void main(String[] args) {
Aaa aaa = new Aaa();
aaa.ccc.bar();
}
}
|