--- /dev/null
+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
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
</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 -->
<!-- ============================================================== -->