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>
pull/212/head
Alexander Kriegisch 1 year ago
parent
commit
cb13d8bf4c

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

@@ -3,10 +3,9 @@ import java.util.List;
public aspect ParameterizedTypesInAnnotationPatterns {
// CE - not an annotation type
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);
}

@interface Foo {}
@interface Foo {}

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

@@ -5017,6 +5017,7 @@
<ajc-test dir="java5/generics/pointcuts" title="annotation patterns with parameterized types">
<compile files="ParameterizedTypesInAnnotationPatterns.aj" options="-1.5">
<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>
</ajc-test>


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

@@ -5017,6 +5017,7 @@
<ajc-test dir="java5/generics/pointcuts" title="annotation patterns with parameterized types">
<compile files="ParameterizedTypesInAnnotationPatterns.aj" options="-1.9">
<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>
</ajc-test>


Loading…
Cancel
Save