--- /dev/null
+import java.lang.annotation.*;
+
+public abstract aspect Base {
+ declare @type: F*: @Anno;
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Anno {
+}
--- /dev/null
+import java.lang.annotation.*;
+
+public abstract aspect Base2<B> {
+ declare @type: F*: @Anno;
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Anno {
+}
--- /dev/null
+public class F1 {
+ public static void main(String []argv) throws Exception {
+ System.out.println(F1.class.getAnnotations()[0]);
+ }
+}
+
+aspect X extends Base {
+}
--- /dev/null
+public class F2 {
+ public static void main(String []argv) throws Exception {
+ System.out.println(F2.class.getAnnotations()[0]);
+ }
+}
+
+aspect X extends Base2<String> {
+}
/*******************************************************************************
- * 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
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");
</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