Bug 85797

Summary: [messages] need compiler error for abstract aspect in declare precedence
Product: [Tools] AspectJ Reporter: Wes Isberg <wes>
Component: CompilerAssignee: Adrian Colyer <adrian.colyer>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P5 CC: aclement
Version: 1.2.1 M1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Wes Isberg CLA 2005-02-18 03:41:44 EST
Semantics notes: "Because advice only applies from concrete aspects, the declare
precedence form only matters when declaring precedence with concrete aspects."

The compiler should emit an error when it encounters an abstract aspect in a
declare precedence statement, perhaps with the suggestion about using T+ for
subaspects.  There's no good reason for the developer to be saying this, so it
need not be an XLint message.  This error will catch (a) developers who don't
know this rule; (b) developers who know but forget (cf "args(T)"); and (c)
developers who generalize an aspect from concrete to abstract without updating
corresponding clients.

I suppose the same goes for a class, unless we redefine declare precedence to
include any aspects enclosed in the class.  We probably don't want an XLint
warning if a pattern picks out both valid concrete aspects and invalid classes
or aspects, because it would trip on T+ or com.company..* way too often.