blob: fa0b1dae6a7d71749b498d2698143dd381e3ae6d (
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
|
public class IfPCDAssignmentCE {
public static void main (String[] args) {
foo(new C());
}
static void foo(C a) {}
}
class C {
static boolean doit() { return true; }
static boolean doit(C a) { return true; }
}
aspect A {
before(C c) : args(c) && call(void foo(C))
&& if ((c=new C()).doit()) { // CE 16
}
before(C c) : args(c) && call(void foo(C))
&& if (C.doit(c = new C())) { // CE 20
}
}
/*
Expecting compiler error on attempts to assign bound variable
in if() PCD. Currently getting compiler stack trace.
*/
|