aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs1810/ambig/Code.java8
-rw-r--r--tests/bugs1810/ambig/X.java13
-rw-r--r--tests/src/org/aspectj/systemtest/ajc1810/Ajc1810Tests.java8
-rw-r--r--tests/src/org/aspectj/systemtest/ajc1810/ajc1810.xml7
4 files changed, 36 insertions, 0 deletions
diff --git a/tests/bugs1810/ambig/Code.java b/tests/bugs1810/ambig/Code.java
new file mode 100644
index 000000000..dab8d6f09
--- /dev/null
+++ b/tests/bugs1810/ambig/Code.java
@@ -0,0 +1,8 @@
+import java.util.List;
+
+aspect F { void A.xx(List<String> x) { xx(null);this.xx(null);};}
+class A {}
+class B extends A { void xx(List<String> x) { xx(null); this.xx(null); super.xx(null); }}
+class C implements D { public void xx(List<String> x) { xx(null); new A().xx(null); new B().xx(null); }}
+interface D { void xx(List<String> x); }
+class E { void foo() { new B().xx(null); new A() {}.xx(null); } }
diff --git a/tests/bugs1810/ambig/X.java b/tests/bugs1810/ambig/X.java
new file mode 100644
index 000000000..6f0a73d97
--- /dev/null
+++ b/tests/bugs1810/ambig/X.java
@@ -0,0 +1,13 @@
+import java.util.List;
+
+aspect F {
+ void A.xx(List<String> x) { }
+}
+class A {
+ //void xx(List<String> x) {}
+}
+class E {
+ void foo() {
+ new A() {}.xx(null);
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc1810/Ajc1810Tests.java b/tests/src/org/aspectj/systemtest/ajc1810/Ajc1810Tests.java
index cff7a3b7b..3af4bb79c 100644
--- a/tests/src/org/aspectj/systemtest/ajc1810/Ajc1810Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc1810/Ajc1810Tests.java
@@ -34,6 +34,14 @@ public class Ajc1810Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
runTest("indy");
}
+ public void testAmbigMessage17() throws Exception {
+ runTest("ambiguous message - 17");
+ }
+
+ public void testAmbigMessage18() throws Exception {
+ runTest("ambiguous message - 18");
+ }
+
// http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.6
public void testInnerClassesAttributeStructure_493554() throws Exception {
runTest("pertarget");
diff --git a/tests/src/org/aspectj/systemtest/ajc1810/ajc1810.xml b/tests/src/org/aspectj/systemtest/ajc1810/ajc1810.xml
index dd4237d22..e53b8aabe 100644
--- a/tests/src/org/aspectj/systemtest/ajc1810/ajc1810.xml
+++ b/tests/src/org/aspectj/systemtest/ajc1810/ajc1810.xml
@@ -11,5 +11,12 @@
<run class="example.kusedep.Cmd"></run>
</ajc-test>
+ <ajc-test dir="bugs1810/ambig" title="ambiguous message - 18">
+ <compile options="-1.8" files="X.java"/>
+ </ajc-test>
+ <ajc-test dir="bugs1810/ambig" title="ambiguous message - 17">
+ <compile options="-1.7" files="X.java"/>
+ </ajc-test>
+
</suite>