Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 322272

Summary: unable to inherit and successfully weave a declare anno from an abstract aspect
Product: [Tools] AspectJ Reporter: Andrew Clement <aclement>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: DEVELOPMENT   
Target Milestone: 1.6.10   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Andrew Clement CLA 2010-08-10 15:08:31 EDT
Discovered by Thomas Risberg.

multipart problem.

First problem is that BinaryTypeBindings deliberately discard synthetic methods when populating their method tables.  This means declare annotation is not processed (it is marked synthetic), since it is not there it cannot be found by the lookup code that wants to discover the annotation.
Comment 1 Andrew Clement CLA 2010-08-10 16:03:08 EDT
step (1), make them non-synthetic

This then reveals the problem that we don't walk the hierarchy to find them.  If they aren't found on the concrete sub-aspect then we fail.  Added code to walk the hierarchy.  The walker code then had to be enhanced to allow that it may walk from a source artifact to a binary artifact.  Then had to allow for it encountering a parameterized type binding during the walk.

test cases added.
Comment 2 Andrew Clement CLA 2010-08-10 16:06:11 EDT
one remaining issue I worry about...  users probably expect declare @type statements to be independent (not subject to overriding).  However, due to their representation as methods whose names have an int suffix, a subtype will override a super!!!!! raised as bug 322282
Comment 3 Andrew Clement CLA 2010-08-10 19:48:47 EDT
test and fix committed