Browse Source

Fix test after node traversal was improved

Due to the latest improvements, an error which was previously not thrown
unexpectedly according to a source code comment in test aspect
ParameterizedTypesInAnnotationPatterns.aj is now thrown for this kind
of pointcut:

  staticinitialization(@(Foo || List<String>) String)

Now the compiler correctly says:

  no static initialization join points for parameterized types,
  use raw type instead

Relates to #221.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
tags/V1_9_22_1
Alexander Kriegisch 1 year ago
parent
commit
cb13d8bf4c

+ 3
- 4
tests/java5/generics/pointcuts/ParameterizedTypesInAnnotationPatterns.aj View File

public aspect ParameterizedTypesInAnnotationPatterns { public aspect ParameterizedTypesInAnnotationPatterns {
// CE - not an annotation type // CE - not an annotation type
pointcut simple() : staticinitialization(@List<String> String); pointcut simple() : staticinitialization(@List<String> String);
// no CE, good enough for now? may improve error reporting for this later
// CE - no static initialization join points for parameterized types, use raw type instead
pointcut combined() : staticinitialization(@(Foo || List<String>) String); pointcut combined() : staticinitialization(@(Foo || List<String>) String);
} }


@interface Foo {}
@interface Foo {}

+ 1
- 0
tests/src/test/resources/org/aspectj/systemtest/ajc150/ajc150.xml View File

<ajc-test dir="java5/generics/pointcuts" title="annotation patterns with parameterized types"> <ajc-test dir="java5/generics/pointcuts" title="annotation patterns with parameterized types">
<compile files="ParameterizedTypesInAnnotationPatterns.aj" options="-1.5"> <compile files="ParameterizedTypesInAnnotationPatterns.aj" options="-1.5">
<message kind="error" line="5" text="is not an annotation type"/> <message kind="error" line="5" text="is not an annotation type"/>
<message kind="error" line="8" text="no static initialization join points for parameterized types, use raw type instead"/>
</compile> </compile>
</ajc-test> </ajc-test>



+ 1
- 0
tests/src/test/resources/org/aspectj/systemtest/ajc190/ajc190_from150.xml View File

<ajc-test dir="java5/generics/pointcuts" title="annotation patterns with parameterized types"> <ajc-test dir="java5/generics/pointcuts" title="annotation patterns with parameterized types">
<compile files="ParameterizedTypesInAnnotationPatterns.aj" options="-1.9"> <compile files="ParameterizedTypesInAnnotationPatterns.aj" options="-1.9">
<message kind="error" line="5" text="is not an annotation type"/> <message kind="error" line="5" text="is not an annotation type"/>
<message kind="error" line="8" text="no static initialization join points for parameterized types, use raw type instead"/>
</compile> </compile>
</ajc-test> </ajc-test>



Loading…
Cancel
Save