blob: b8ef0d27c8364848cb5b47ed4d2675480123d2ec (
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
|
import org.aspectj.testing.*;
/**
* with -usejavac: cannot resolve symbol
* without -usejavac: VerifyError
*/
public aspect AroundDoubleAssignment {
public static void main( String[] args ){
Tester.expectEvent("test");
Tester.expectEvent("proceed");
StaticSet.test();
Tester.checkAllEvents();
}
Object around() : execution( * StaticSet.*() ) {
Tester.event("proceed");
return proceed();
}
}
class StaticSet {
/** @testcase PR#687 around all execution with double assignment in initializer (simple) */
public static void test(){
String s = s = "test";
Tester.event("test");
}
}
|