--- /dev/null
+public aspect pr79523 {
+
+ pointcut someCalls(String str) : call(*.new(String)) && args(str);
+ declare warning : someCalls(str) : "not allowed"; // CE L 4
+
+}
\ No newline at end of file
runTest("@SuppressWarnings should suppress");
}
+ public void testDEOWWithBindingPointcut() {
+ runTest("declare warning : foo(str) : ...;");
+ }
+
// helper methods.....
public SyntheticRepository createRepos(File cpentry) {
</compile>
</ajc-test>
-
+ <ajc-test dir="bugs150" pr="79523" title="declare warning : foo(str) : ...;">
+ <compile files="pr79523.aj">
+ <message line="4" kind="warning" text="no match for this type name: str"/>
+ <message line="4" kind="error" text="bad parameter"/>
+ <message line="4" kind="error" text="args() pointcut designator cannot be used in declare statement"/>
+ </compile>
+ </ajc-test>
+
<ajc-test dir="bugs150" pr="107059" title="parser crashes on call(void (@a *)(..)">
<compile files="pr107059.aj">
<message line="3" kind="error" text="Syntax error on token "(", "name pattern" expected"/>
IntMap newBindings = new IntMap();
for (int i=0,len=arguments.size(); i < len; i++) {
TypePattern p = arguments.get(i);
+ if (p == TypePattern.NO) continue;
//we are allowed to bind to pointcuts which use subtypes as this is type safe
if (!p.matchesSubtypes(parameterTypes[i]) &&
!p.getExactType().equals(UnresolvedType.OBJECT))