]> source.dussan.org Git - aspectj.git/commitdiff
255555: pattern parser allowing for parentheses around declare anno signatures; cope...
authoraclement <aclement>
Sat, 29 Nov 2008 20:46:47 +0000 (20:46 +0000)
committeraclement <aclement>
Sat, 29 Nov 2008 20:46:47 +0000 (20:46 +0000)
tests/multiIncremental/pr255555/base/src/test/Demo.aj [new file with mode: 0644]
tests/multiIncremental/pr255555/base/src/test/MyAspect.aj [new file with mode: 0644]
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java

diff --git a/tests/multiIncremental/pr255555/base/src/test/Demo.aj b/tests/multiIncremental/pr255555/base/src/test/Demo.aj
new file mode 100644 (file)
index 0000000..1f23a21
--- /dev/null
@@ -0,0 +1,15 @@
+package test;
+
+import java.util.List;
+
+public class Demo {
+
+/*
+    void g() {
+        new Demo(7).foo(null);
+        x++;
+        this.x++;
+    }
+*/
+
+}
diff --git a/tests/multiIncremental/pr255555/base/src/test/MyAspect.aj b/tests/multiIncremental/pr255555/base/src/test/MyAspect.aj
new file mode 100644 (file)
index 0000000..970be41
--- /dev/null
@@ -0,0 +1,12 @@
+package test;
+import java.util.List;
+
+public privileged aspect MyAspect {
+       void Demo.foo(java.util.List<String> x) { }
+        declare @method: (void Demo.foo(..): @Deprecated;
+       declare @type: Demo: @Deprecated;
+       
+        //declare @field: (int Demo.x): @Deprecated;
+        //declare @constructor: (public Demo.new(int)): @Deprecated;
+
+}
index 293bfe9ec82878d0f65b61032164e884fda736bf..6e7ef3dca823c25a7490e43248596a88944947b8 100644 (file)
@@ -183,6 +183,13 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                assertEquals("=BrokenHandles<p{GetInfo.java}GetInfo`declare parents!3", ipe.getHandleIdentifier());
        }
 
+       public void testAnnotations_pr255555() {
+               String p = "pr255555";
+               initialiseProject(p);
+               build(p);
+               checkCompileWeaveCount(p, 2, 1);
+       }
+
        public void testSpacewarHandles() {
                // String p = "SpaceWar";
                String p = "Simpler";