mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-09-07 13:23:44 +02:00
28 lines
625 B
Java
28 lines
625 B
Java
|
import org.aspectj.testing.Tester;
|
||
|
|
||
|
/**
|
||
|
* @author wes
|
||
|
*/
|
||
|
public class IfPCDExprAssignUnparseFailure {
|
||
|
public static void main(String[] args) {
|
||
|
Tester.check(true, "compiler test");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* NPE unwinding assignment in if pcd expression:
|
||
|
* <pre>
|
||
|
* unexpected exception:
|
||
|
* org.aspectj.compiler.base.InternalCompilerError
|
||
|
* java.lang.NullPointerException
|
||
|
* at org.aspectj.compiler.base.ast.AssignExpr.unparse(AssignExpr.java:78)
|
||
|
* <pre>
|
||
|
* in revision 1.26 of AssignExpr.java.
|
||
|
*/
|
||
|
aspect AspectFor {
|
||
|
static int i;
|
||
|
pointcut namedIf ()
|
||
|
: if(0 == (i = 2)) ; // NPE unwinding assignment in if
|
||
|
|
||
|
}
|