Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] ajc150 testsuite questions

Hi Martin,

In a couple of places I believe the grammar productions in the notebook are not correct. let me comment on two of your cases:

On 26/03/06, Martin Bravenboer <martin.bravenboer@xxxxxxxxx> wrote:
-----------------------------------------------------------
java5/annotations/aspectMembers/a/AnnotatedAspect08.aj
  declare soft : execution(* *) : Exception;

This file looks wrong to me: the exception name and the pointcut have
been reversed. I suppose this is a mistake? Also, the argument of the
execution pointcut seems to be wrong: I think it should be execution(*
*())

Yep, the file is invalid.  The program doesn't compile - the test is commented out in Annotations.java, so it doesn't get run. The comment against the test is 'uncomment this test when parser is opened up' - and looks like we haven't opened up the parser to address the problem yet (the problem is annotating declares - clearly the declare soft syntax is wrong).  I've checked it in the right way round in case others go searching through the testcode.
 

-----------------------------------------------------------
java5/generics/pointcuts/GenericDeclaringTypeWithParameterErasure.aj

This file uses a generic execution pointcut:
  execution<N>(* GenericInterface<N extends Number>.asInt(Number))

The history of these generic pointcuts is a bit unclear to me: I saw
more of these parameterized pointcuts in the unit tests of the pattern
parser, but they have all been commented out. Anyway, ajc does not
accept this, so I assume this is invalid?

Yep, its not allowed :
D:\temp\GenericDeclaringTypeWithParameterErasure.aj:15 [error] Syntax error on token "<", "(" expected
execution<N>(* GenericInterface<N extends Number>.asInt(Number)) :

During design of AspectJ5, we tried some syntax variations then discarded them.  Either because they were confusing or we just didn't need the support right now - we had our hands full just implementing what is in the notebook.  This test is not referenced from the generics test suite and is never compiled.

If these generic pointcuts have been discussed somewhere, could you
point me to the discussion? I would like to know a bit about why they
were proposed and if this is going to be supported in the future or
not :)

The only discussion was informal chatting ;)  We may support them in the future if there is a compelling reason to do so.

Andy.


Back to the top