Bug 265418 - [matching] Subtype varargs type pattern is broken
Summary: [matching] Subtype varargs type pattern is broken
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.6.1   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 1.6.4   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-19 03:21 EST by Yang Meyer CLA
Modified: 2009-02-19 16:06 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.