Community
Participate
Working Groups
public aspect Bug { before() : call(void (@a *)(..)) { } } /home/user/sgelin3/dev/java/ajc/new_bug/Bug.java [error] Internal compiler error java.lang.RuntimeException: bad name: [Lorg.aspectj.weaver.patterns.NamePattern;@530cf2 at org.aspectj.weaver.patterns.WildTypePattern.maybeGetCleanName(WildTypePattern.java:507) at org.aspectj.weaver.patterns.WildTypePattern.resolveBindings(WildTypePattern.java:566) at org.aspectj.weaver.patterns.SignaturePattern.resolveBindings(SignaturePattern.java:79) not that the pointcut causing the crash is incorrect abd should produce an error. the actual pointcut I intended to write was before() : call(void (@a *).*(..)) {} which works fine.
fix checked into tree, awaiting build.
target(@a *) also causes ajc to crash, does your change fix this too?
yes..... but ;) it fixes the parser problem, but exposed an unrelated problem whereby we allowed an "any" type pattern with annotation specified to slip through the net when resolving a pattern and requiring an exact type. The correct behaviour for target(@Foo *) is to issue an error saying that an exact type name must be used with target. The compiler now does this.
why such a strict requirement? you could check for the attribute at runtime.
pointcuts with binding forms have never allowed patterns (what type should the bound variable have?). If you want to match any target type but with a certain annotation you can use @target instead which does exactly this.
M4
wups
LATER/REMIND bugs are being automatically reopened as P5 because the LATER and REMIND resolutions are deprecated.