Bug 53996 - xlint warning: match impossible due to args numericity conflict
Summary: xlint warning: match impossible due to args numericity conflict
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.1.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 1.5.0 M4   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-07 16:24 EST by Wes Isberg CLA
Modified: 2005-08-17 14:19 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wes Isberg CLA 2004-03-07 16:24:16 EST
Some pointcuts will never match because the number of args is specified
differently in two places (from signatures and/or args(..)).  e.g.,

  pointcut f(String s) : call(void foo(String, String)) && args(s)

When weaving advice (but not declare warning), it would be nice to have an XLint
warning indicating that the pointcut can never match.  

(Perhaps also optimize away as never matching.)
Comment 1 Adrian Colyer CLA 2005-03-22 08:45:33 EST
The optimization was implemented in AJ5 M1. The XLint warning wasn't. We have a
warning in AJ5 M2 that warns if the pointcut is associated with advice (did not
match, controlled by @SuppressAjWarnings). We don't warn in any way if the
pointcut was associated with a declare statemement. We should consider adding
one as this would report the error as close as possible to the textual location
in the source.
Comment 2 Adrian Colyer CLA 2005-08-17 14:19:50 EDT
we have -Xlint:adviceDidNotMatch and @SuppressAjWarnings both fully operational in the AspectJ 5 
codebase now.