Bug 86057 - expect error when overriding final pointcuts
Summary: expect error when overriding final pointcuts
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.2.1 M1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.5.0 M3   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-21 17:25 EST by Wes Isberg CLA
Modified: 2005-08-19 12:52 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 2005-02-21 17:25:49 EST
I get no compiler error when I "override"/redefine a final pointcut:

------------
public class Main {
    static void walk() {}
    static void run() {}
    public static void main(String[] args) {
        walk();
        run();
    }
}
abstract aspect AA {
    public final pointcut publicPointcut() : call(void walk());
    before() : publicPointcut() { System.out.print("here: " + thisJoinPoint); }
}
aspect AA1 extends AA {
    // expecting error here b/c pointcut is final
    public pointcut publicPointcut() : call(void run());
}
------------
When run, it picks out run() rather than walk().
Comment 1 Adrian Colyer CLA 2005-03-23 09:48:21 EST
we should tidy this up in aj5m3
Comment 2 Adrian Colyer CLA 2005-08-19 12:52:54 EDT
fixed in tree.