aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/declarePrecedenceWithClasses/DeclarePrecedenceTestClass.java15
-rw-r--r--tests/bugs/declarePrecedenceWithClasses/Priority.aj11
2 files changed, 26 insertions, 0 deletions
diff --git a/tests/bugs/declarePrecedenceWithClasses/DeclarePrecedenceTestClass.java b/tests/bugs/declarePrecedenceWithClasses/DeclarePrecedenceTestClass.java
new file mode 100644
index 000000000..98e2779d9
--- /dev/null
+++ b/tests/bugs/declarePrecedenceWithClasses/DeclarePrecedenceTestClass.java
@@ -0,0 +1,15 @@
+//Bug 53012
+// DP contains a declare precedence statement that mentions classes
+
+public class DeclarePrecedenceTestClass {
+ public static void main(String[] args) {
+ System.out.println("hello");
+ }
+}
+aspect DP {
+ declare precedence: DeclarePrecedenceTestClass, DP;
+
+ before() : staticinitialization(DeclarePrecedenceTestClass) {
+ System.out.println("ok");
+ }
+}
diff --git a/tests/bugs/declarePrecedenceWithClasses/Priority.aj b/tests/bugs/declarePrecedenceWithClasses/Priority.aj
new file mode 100644
index 000000000..fc44fbff0
--- /dev/null
+++ b/tests/bugs/declarePrecedenceWithClasses/Priority.aj
@@ -0,0 +1,11 @@
+// Bug 53012
+// Although the declare precedence mentions interfaces (and not aspects explicitly), it does
+// mention with a '+' suffix - this should be allowed.
+
+public aspect Priority {
+ public interface Highest {}
+ public interface Lowest {}
+ declare precedence: Highest+, *, Lowest+;
+}
+
+aspect Security implements Priority.Highest {}