aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/bugs160/pr165631/Bug.java13
-rw-r--r--tests/bugs160/pr165631/Bug2.java15
-rw-r--r--tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java1
-rw-r--r--tests/src/org/aspectj/systemtest/ajc160/ajc160.xml10
4 files changed, 39 insertions, 0 deletions
diff --git a/tests/bugs160/pr165631/Bug.java b/tests/bugs160/pr165631/Bug.java
new file mode 100644
index 000000000..e1ceb22ad
--- /dev/null
+++ b/tests/bugs160/pr165631/Bug.java
@@ -0,0 +1,13 @@
+interface A<T> {}
+
+interface B<T> extends A<T> {}
+
+class C implements A<String> {
+}
+
+class D extends C {
+}
+
+aspect X {
+ declare parents: D implements B<Number>;
+}
diff --git a/tests/bugs160/pr165631/Bug2.java b/tests/bugs160/pr165631/Bug2.java
new file mode 100644
index 000000000..0754042e9
--- /dev/null
+++ b/tests/bugs160/pr165631/Bug2.java
@@ -0,0 +1,15 @@
+interface A<T> {}
+
+interface B<T> extends A<T> {}
+
+class C implements A<String> {}
+
+interface A1 {}
+
+class D extends C implements A1 {
+}
+
+aspect X {
+ declare parents: D implements B<Number>;
+}
+
diff --git a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
index d3c343b11..660d31544 100644
--- a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
@@ -23,6 +23,7 @@ public class Ajc160Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
public void testGenericFieldNPE_pr165885() { runTest("generic field npe");}
public void testIncorrectOptimizationOfIstore_pr166084() { runTest("incorrect optimization of istore"); }
+ public void testDualParameterizationsNotAllowed_pr165631() { runTest("dual parameterizations not allowed"); }
/////////////////////////////////////////
public static Test suite() {
diff --git a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml
index a89a80949..1b157acaf 100644
--- a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml
+++ b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml
@@ -14,6 +14,16 @@
<compile files="X.java" inpath="simple.jar"/>
<run class="Simple"/>
</ajc-test>
+
+ <ajc-test dir="bugs160/pr165631" title="dual parameterizations not allowed">
+ <!-- two variations of the same situation, should fail in the same way -->
+ <compile files="Bug.java" options="-1.5">
+ <message kind="error" line="12" text="Cannot declare parent B"/>
+ </compile>
+ <compile files="Bug2.java" options="-1.5">
+ <message kind="error" line="13" text="Cannot declare parent B"/>
+ </compile>
+ </ajc-test>
<!-- second section - need a 1.6 vm -->