Bug 265418

Summary: [matching] Subtype varargs type pattern is broken
Product: [Tools] AspectJ Reporter: Yang Meyer <yang.meyer>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: aclement
Version: 1.6.1   
Target Milestone: 1.6.4   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Yang Meyer CLA 2009-02-19 03:21:36 EST
Build ID: M20080911-1700

Steps To Reproduce:
void around(Object[] varargs) : call(* *.*(Object+...)) && args(varargs) {
     foo(varargs);
}

The compiler complains about the ellipsis, it expects a closing paren instead.

More information:
The syntax in the example above ("Object+...") seems to be in accordance with the grammar described in the AspectJ/ADK 1.5 Notebook:
http://www.eclipse.org/aspectj/doc/released/adk15notebook/annotations-pointcuts-and-advice.html#signaturePatterns
(MethodPattern => FormalsPattern => TypePattern '...' => SimpleTypePattern)
 
I am using the 1.6.1 runtime with Equinox Aspects.
Comment 1 Andrew Clement CLA 2009-02-19 13:21:51 EST
This is related to bug 148508.  Once I correct the parser to allow this construct then it fails to match String... because of the reasons in 148508
Comment 2 Andrew Clement CLA 2009-02-19 16:06:33 EST
parser fixed and that dependent bug also fixed.  This now working, I believe.  Will be in the next dev build.