summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/java5/generics/pointcuts/RawSignatureMatching.aj17
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ajc150.xml6
3 files changed, 27 insertions, 0 deletions
diff --git a/tests/java5/generics/pointcuts/RawSignatureMatching.aj b/tests/java5/generics/pointcuts/RawSignatureMatching.aj
new file mode 100644
index 000000000..cd2640c74
--- /dev/null
+++ b/tests/java5/generics/pointcuts/RawSignatureMatching.aj
@@ -0,0 +1,17 @@
+public aspect RawSignatureMatching {
+
+ // tests that references to a generic or parameterized type are
+ // always matched by a type pattern refering to the raw type form
+
+ void someCode() {
+ ConcreteImplementingClass cic = new ConcreteImplementingClass();
+ cic.asInt(5.0d);
+ GenericImplementingClass<Long> gic = new GenericImplementingClass<Long>();
+ gic.asInt(55L);
+ }
+
+ declare warning :
+ execution(* GenericInterface.asInt(Number)) :
+ "execution(* GenericInterface.asInt(Number))";
+
+} \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java b/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java
index fffb6c9b4..02a493639 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/GenericsTests.java
@@ -184,6 +184,10 @@ public class GenericsTests extends XMLBasedAjcTestCase {
runTest("execution pcd with raw type matching");
}
+ public void testExecutionWithRawSignature() {
+ runTest("execution pcd with raw signature matching");
+ }
+
// --- helpers
// Check the signature attribute on a class is correct
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
index fe5f9f564..71593277b 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
+++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
@@ -2472,6 +2472,12 @@
</compile>
</ajc-test>
+ <ajc-test dir="java5/generics/pointcuts" title="execution pcd with raw signature matching">
+ <compile files="GenericInterface.java,ConcreteImplementingClass.java,GenericImplementingClass.java,RawSignatureMatching.aj" options="-1.5">
+ <message kind="warning" line="4" text="execution(* GenericInterface.asInt(Number))"/>
+ <message kind="warning" line="5" text="execution(* GenericInterface.asInt(Number))"/>
+ </compile>
+ </ajc-test>
<!-- end of generics and pointcuts tests -->
<!-- ============================================================== -->