Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Re: A switch oddity

fyi, just added bugs and test cases on point:

- final static fields not being treated as constant (doc/fix)
  https://bugs.eclipse.org/bugs/show_bug.cgi?id=52105

- NoSuchMethod accessing field declared on interface
  https://bugs.eclipse.org/bugs/show_bug.cgi?id=52107

As you note, we also need to clarify the initialization of
ITD final fields, currently being done in an initializer,
which limits them somewhat.

Wes


Matthew Webster wrote:



So it's a bug either way.  We should implement it if we can
for top-level subtypes, or the compiler should signal an
error and we should document the limitation.


You seem to have found a different problem with interfaces that is a bug
however there is still the issue of the behaviour of ITD final static
fields. They cannot actually be final so cannot be used in "switch()" so I
believe they shouldn't be allowed. I'm sure there are alternative i.e.
final static in the aspect itself.

There is also the other problem I mentioned of not being able to set an ITD
final in an ITD constructor. They also have implicit initializers unlike
Java final field. This is perhaps a different bug.

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users




Back to the top