]> source.dussan.org Git - aspectj.git/commitdiff
Fix test after node traversal was improved
authorAlexander Kriegisch <Alexander@Kriegisch.name>
Mon, 30 Jan 2023 15:32:07 +0000 (16:32 +0100)
committerAlexander Kriegisch <Alexander@Kriegisch.name>
Fri, 12 Apr 2024 12:19:06 +0000 (14:19 +0200)
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>
tests/java5/generics/pointcuts/ParameterizedTypesInAnnotationPatterns.aj
tests/src/test/resources/org/aspectj/systemtest/ajc150/ajc150.xml
tests/src/test/resources/org/aspectj/systemtest/ajc190/ajc190_from150.xml

index 6f8b25c4f61bdafd3ee9b70b2137664d4652ac54..b3ecc2456843a5a1ea65c1265e55d65fed779fad 100644 (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 {}
\ No newline at end of file
+@interface Foo {}
index 138ca57ab482cdd5a869de594163aa59976b296d..5f5ed34d8afdc7031cf6c21fa052483370077131 100644 (file)
    <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>
 
index d21ecf8e6e9f01f998672ec651f61c48e1d39b79..e9f887d8075151b49e02f0e2df923ff5a4aada6d 100644 (file)
    <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>