Summary: | ajc crashes when compiling the following program (binding this() and target()) | ||
---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | c03sk |
Component: | Compiler | Assignee: | Adrian Colyer <adrian.colyer> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | P3 | ||
Version: | 1.2 | ||
Target Milestone: | 1.2.1 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
c03sk
2004-06-02 10:29:50 EDT
For this bug I propose the same solution we used for args() (bug 61568) which will make this a proper compile time error. Fundamentally we are saying that you aren't allowed to bind more than once to a formal - this doesn't seem *too* unreasonable. Current proposal for the message is: C:\temp\ajcSandbox\ajcTest16749.tmp\PR65319.java:9:0 Cannot use target() to match at this location and bind a formal to type 'Test2' - the formal is already bound to type 'Test'. The secondary source location points to the problematic target(). see also: C:\temp\ajcSandbox\ajcTest16749.tmp\PR65319.java:16 If there is a compelling use case we could look at perhaps supporting this properly, but without one we'll stick to outputting an error. Proposed fix checked in. Message isn't great but its better than a crash at weave time. Fix available in: BUILD COMPLETE - build.334 Date of build: 08/10/2004 18:17:11 Time to build: 92 minutes 34 seconds Last changed: 08/10/2004 17:33:42 Latest good AspectJ jar available at: download.eclipse.org/technology/ajdt/dev/aspectj-DEVELOPMENT.jar Fix released as part of AspectJ 1.2.1 |