zrcadlo
https://github.com/eclipse-aspectj/aspectj.git
synchronizováno 2024-08-27 05:54:38 +02:00
23 řádky
587 B
Java
23 řádky
587 B
Java
|
|
/** Currently there are no messages emitted for
|
|
* compile-time errors from advice bodies if the
|
|
* advice is not woven into the base class.
|
|
* This can lead to silent failures.
|
|
*/
|
|
class UnwovenAdviceNotCheckedCE {
|
|
public static void main(String[] args) {
|
|
System.err.println("main");
|
|
}
|
|
}
|
|
|
|
aspect Aspect {
|
|
void around (String[] args)
|
|
: args(args)
|
|
&& call(void UnwovenAdviceNotCheckedCE.main()) { // forgot (..), so unwoven
|
|
System.err.println("before main");
|
|
proceed() ; // CE: should get compile error here - need (args)
|
|
System.err.println("after main");
|
|
}
|
|
}
|
|
|