]> source.dussan.org Git - aspectj.git/commitdiff
pr 45184: External pointcut refs not resolved if named pointcut used by declare
authoracolyer <acolyer>
Wed, 7 Jan 2004 16:41:12 +0000 (16:41 +0000)
committeracolyer <acolyer>
Wed, 7 Jan 2004 16:41:12 +0000 (16:41 +0000)
tests/bugs/DeclareErrorNamedPointcutCE.java [new file with mode: 0644]

diff --git a/tests/bugs/DeclareErrorNamedPointcutCE.java b/tests/bugs/DeclareErrorNamedPointcutCE.java
new file mode 100644 (file)
index 0000000..94865e4
--- /dev/null
@@ -0,0 +1,18 @@
+// pr 45184
+
+public class DeclareErrorNamedPointcutCE {
+       public static void main(String[] args) {
+               new C().run();
+       }
+}
+
+class C {
+       void run() { } // CW expected here
+}
+
+aspect A { pointcut pc(): execution(void run()); }
+
+aspect B {
+       pointcut ref() : A.pc();  // bug: A.pc() treated as B.pc()
+       declare error : ref() : "ref";  
+}
\ No newline at end of file