Community
Participate
Working Groups
Sample source: public class Base { int x; } aspect ExtendBase { private int x; declare parents: Y extends ExtendBase; } class Y extends Base { public int foo() { System.out.println(x); } } I believe this is valid AspectJ code. Compiling with 1.5.0M2 gives the following errors: C:\devel\test\itd\hiding>ajc Base.java C:\devel\test\itd\hiding\Base.java:10 [error] Implicit super constructor ExtendB ase() is not visible for default constructor. Must define an explicit constructo r class Y extends Base { C:\devel\test\itd\hiding\Base.java:12 [error] The field x is not visible System.out.println(x); 2 errors
look at for M4
test program in cvs.
The program as it stands is not valid (ExtendBase does *not* extend Base), so we should put out a better error message. If ExtendBase does extend Base, the error is still the same as the aspect has a non-public default constructor. A hierarchy with Class | Aspect | Class is certainly unusual enough that we won't hold 1.5.0 for it!