aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/bugs1610/pr322272/Base.java9
-rw-r--r--tests/bugs1610/pr322272/Base2.java9
-rw-r--r--tests/bugs1610/pr322272/F1.java8
-rw-r--r--tests/bugs1610/pr322272/F2.java8
-rw-r--r--tests/src/org/aspectj/systemtest/ajc1610/Ajc1610Tests.java11
-rw-r--r--tests/src/org/aspectj/systemtest/ajc1610/ajc1610.xml22
6 files changed, 65 insertions, 2 deletions
diff --git a/tests/bugs1610/pr322272/Base.java b/tests/bugs1610/pr322272/Base.java
new file mode 100644
index 000000000..035fa9c6b
--- /dev/null
+++ b/tests/bugs1610/pr322272/Base.java
@@ -0,0 +1,9 @@
+import java.lang.annotation.*;
+
+public abstract aspect Base {
+ declare @type: F*: @Anno;
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Anno {
+}
diff --git a/tests/bugs1610/pr322272/Base2.java b/tests/bugs1610/pr322272/Base2.java
new file mode 100644
index 000000000..08131a6b4
--- /dev/null
+++ b/tests/bugs1610/pr322272/Base2.java
@@ -0,0 +1,9 @@
+import java.lang.annotation.*;
+
+public abstract aspect Base2<B> {
+ declare @type: F*: @Anno;
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Anno {
+}
diff --git a/tests/bugs1610/pr322272/F1.java b/tests/bugs1610/pr322272/F1.java
new file mode 100644
index 000000000..c3df6093b
--- /dev/null
+++ b/tests/bugs1610/pr322272/F1.java
@@ -0,0 +1,8 @@
+public class F1 {
+ public static void main(String []argv) throws Exception {
+ System.out.println(F1.class.getAnnotations()[0]);
+ }
+}
+
+aspect X extends Base {
+}
diff --git a/tests/bugs1610/pr322272/F2.java b/tests/bugs1610/pr322272/F2.java
new file mode 100644
index 000000000..c0df2c9ac
--- /dev/null
+++ b/tests/bugs1610/pr322272/F2.java
@@ -0,0 +1,8 @@
+public class F2 {
+ public static void main(String []argv) throws Exception {
+ System.out.println(F2.class.getAnnotations()[0]);
+ }
+}
+
+aspect X extends Base2<String> {
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc1610/Ajc1610Tests.java b/tests/src/org/aspectj/systemtest/ajc1610/Ajc1610Tests.java
index 04641aaaf..061be391b 100644
--- a/tests/src/org/aspectj/systemtest/ajc1610/Ajc1610Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc1610/Ajc1610Tests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008 Contributors
+ * Copyright (c) 2008 Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -18,7 +18,14 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
public class Ajc1610Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
- // Interesting new behaviour on AspectJ 1.6.9 - probably due to initial inner type changes.
+ public void testAbstractAspectAndDeclares_322272_2() {
+ runTest("abstract aspects and declares - 2");
+ }
+
+ public void testAbstractAspectAndDeclares_322272() {
+ runTest("abstract aspects and declares");
+ }
+ // Interesting new behaviour on AspectJ 1.6.9 - probably due to initial inner type changes.
// Looks a real error (creating two annotations the same on a type is a bad thing)
// public void testDuplicateAnnotations() {
// runTest("duplicate annotation");
diff --git a/tests/src/org/aspectj/systemtest/ajc1610/ajc1610.xml b/tests/src/org/aspectj/systemtest/ajc1610/ajc1610.xml
index c51060775..44b7c0eba 100644
--- a/tests/src/org/aspectj/systemtest/ajc1610/ajc1610.xml
+++ b/tests/src/org/aspectj/systemtest/ajc1610/ajc1610.xml
@@ -12,4 +12,26 @@
</compile>
</ajc-test>
+ <ajc-test dir="bugs1610/pr322272" title="abstract aspects and declares">
+ <compile files="Base.java" outjar="superaspect.jar" options="-1.5"/>
+ <compile files="F1.java" classpath="superaspect.jar" options="-1.5">
+ </compile>
+ <run class="F1">
+ <stdout>
+ <line text="@Anno()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs1610/pr322272" title="abstract aspects and declares - 2">
+ <compile files="Base2.java" outjar="superaspect.jar" options="-1.5"/>
+ <compile files="F2.java" classpath="superaspect.jar" options="-1.5">
+ </compile>
+ <run class="F2">
+ <stdout>
+ <line text="@Anno()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
</suite> \ No newline at end of file