Bug 85797 - [messages] need compiler error for abstract aspect in declare precedence
Summary: [messages] need compiler error for abstract aspect in declare precedence
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.2.1 M1   Edit
Hardware: PC Windows XP
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-18 03:41 EST by Wes Isberg CLA
Modified: 2007-10-23 06:34 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 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.