Bug 235505 - parsing errors on privileged generic aspect
Summary: parsing errors on privileged generic aspect
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.6.0   Edit
Hardware: PC Linux
: P2 blocker (vote)
Target Milestone: 1.6.1   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-03 22:39 EDT by charles CLA
Modified: 2008-06-10 23:44 EDT (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 charles CLA 2008-06-03 22:39:01 EDT
The following aspect definition gives a parsing error:

public privileged abstract aspect<T> {

}
Comment 1 Andrew Clement CLA 2008-06-05 12:33:48 EDT
probably needs a parser regen - yuck
Comment 2 Andrew Clement CLA 2008-06-09 23:31:40 EDT
yep, just looked and it requires a grammar change.
Comment 3 Andrew Clement CLA 2008-06-10 15:11:25 EDT
fixed!  I'm a hero - and decided to upgrade the grammar to support this.  This is my testcase:

privileged abstract aspect A<T> {
  public void foo(T t) { System.out.println(t); }
  before(T t): execution(* *(..)) && args(t) && !within(A+) { foo(t); }
}

aspect X extends A<String> {}

public class B {
  public static void main(String []argv) {
    new B().run("Hello World");
  }

  public void run(String s) {
    System.out.println(s);
  }
}

It doesn't exploit the fact that the aspect is privileged, but it does compile and run OK.

Fix will be in next dev build.

Just a note that the original declaration in the bug report is missing an actual type name (it should be 'aspect Something<T>' and not just 'aspect<T>' - but I know what you meant ;) )
Comment 4 charles CLA 2008-06-10 23:44:56 EDT
Andy, don't know how to thank you. I will verify this for the next dev. build.