]> source.dussan.org Git - aspectj.git/commitdiff
@testcase PR#40858 weaver trace on mis-qualified pointcut reference
authorwisberg <wisberg>
Mon, 28 Jul 2003 21:50:11 +0000 (21:50 +0000)
committerwisberg <wisberg>
Mon, 28 Jul 2003 21:50:11 +0000 (21:50 +0000)
tests/ajcTestsFailing.xml
tests/bugs/SuperPointcutCE.java [new file with mode: 0644]

index 455eff98915c6f32f3049e7ab2d411af36da9422..2fb35805454467551243af17f1ad05ac0c9feb59 100644 (file)
@@ -4,6 +4,15 @@
 <!-- contains valid tests that the compiler has never passed -->
 
 <suite>
+       <ajc-test dir="bugs"
+               pr="40858"
+               comment="shouldn't super ref be permitted?"
+               title="weaver trace on mis-qualified pointcut reference">
+               <compile files="SuperPointcutCE.java">
+                       <message kind="error" line="26"/>
+                       </compile>
+               </ajc-test>
+
        <ajc-test dir="bugs"
                pr="40814"
                title="compile error expected for interface pointcuts">
diff --git a/tests/bugs/SuperPointcutCE.java b/tests/bugs/SuperPointcutCE.java
new file mode 100644 (file)
index 0000000..7231fb0
--- /dev/null
@@ -0,0 +1,27 @@
+
+
+public class MissingTypeSigatureCE {
+    public static void main(String[] a) {
+        new C().run();
+    }
+}
+
+class C {
+    public void run(){ System.out.println("c");}
+}
+
+abstract aspect AA {
+    pointcut pc() : call(public * *(..)) && !within(AA+);
+    before() : pc() {
+        System.out.println("here: " + thisJoinPointStaticPart);
+    }
+}
+
+/** @testcase PR#40858 weaver trace on mis-qualified pointcut reference */
+aspect B extends AA {
+    
+    pointcut pc() : super.pc() 
+        && !call(void println(..));
+        
+    pointcut blah() : UnknownType.pc();  // CE
+}