1
0
Mirror von https://github.com/eclipse-aspectj/aspectj.git synchronisiert 2024-08-27 05:54:38 +02:00
org.aspectj/tests/new/UnwovenAdviceNotCheckedCE.java
2002-12-16 18:51:06 +00:00

23 Zeilen
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");
}
}