Bug 53996

Summary: xlint warning: match impossible due to args numericity conflict
Product: [Tools] AspectJ Reporter: Wes Isberg <wes>
Component: CompilerAssignee: Adrian Colyer <adrian.colyer>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: 1.1.1   
Target Milestone: 1.5.0 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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.