import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
+import java.util.Set;
import org.aspectj.org.eclipse.jdt.core.compiler.CharOperation;
import org.aspectj.org.eclipse.jdt.core.compiler.IProblem;
return orig;
}
- List ret = new ArrayList(Arrays.asList(orig));
+ Set<MethodBinding> ret = new HashSet<MethodBinding>(Arrays.asList(orig));
// System.err.println("declared method: " + ret + " inters = " + interTypeMethods);
for (int i = 0, len = interTypeMethods.size(); i < len; i++) {
--- /dev/null
+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); } }
--- /dev/null
+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);
+ }
+}
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");
<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>