1831 /** Return the first method in t2 that conflicts with a method from t1. */ |
1831 /** Return the first method in t2 that conflicts with a method from t1. */ |
1832 private Symbol firstDirectIncompatibility(DiagnosticPosition pos, Type t1, Type t2, Type site) { |
1832 private Symbol firstDirectIncompatibility(DiagnosticPosition pos, Type t1, Type t2, Type site) { |
1833 for (Scope.Entry e1 = t1.tsym.members().elems; e1 != null; e1 = e1.sibling) { |
1833 for (Scope.Entry e1 = t1.tsym.members().elems; e1 != null; e1 = e1.sibling) { |
1834 Symbol s1 = e1.sym; |
1834 Symbol s1 = e1.sym; |
1835 Type st1 = null; |
1835 Type st1 = null; |
1836 if (s1.kind != MTH || !s1.isInheritedIn(site.tsym, types)) continue; |
1836 if (s1.kind != MTH || !s1.isInheritedIn(site.tsym, types) || |
|
1837 (s1.flags() & SYNTHETIC) != 0) continue; |
1837 Symbol impl = ((MethodSymbol)s1).implementation(site.tsym, types, false); |
1838 Symbol impl = ((MethodSymbol)s1).implementation(site.tsym, types, false); |
1838 if (impl != null && (impl.flags() & ABSTRACT) == 0) continue; |
1839 if (impl != null && (impl.flags() & ABSTRACT) == 0) continue; |
1839 for (Scope.Entry e2 = t2.tsym.members().lookup(s1.name); e2.scope != null; e2 = e2.next()) { |
1840 for (Scope.Entry e2 = t2.tsym.members().lookup(s1.name); e2.scope != null; e2 = e2.next()) { |
1840 Symbol s2 = e2.sym; |
1841 Symbol s2 = e2.sym; |
1841 if (s1 == s2) continue; |
1842 if (s1 == s2) continue; |
1842 if (s2.kind != MTH || !s2.isInheritedIn(site.tsym, types)) continue; |
1843 if (s2.kind != MTH || !s2.isInheritedIn(site.tsym, types) || |
|
1844 (s2.flags() & SYNTHETIC) != 0) continue; |
1843 if (st1 == null) st1 = types.memberType(t1, s1); |
1845 if (st1 == null) st1 = types.memberType(t1, s1); |
1844 Type st2 = types.memberType(t2, s2); |
1846 Type st2 = types.memberType(t2, s2); |
1845 if (types.overrideEquivalent(st1, st2)) { |
1847 if (types.overrideEquivalent(st1, st2)) { |
1846 List<Type> tvars1 = st1.getTypeArguments(); |
1848 List<Type> tvars1 = st1.getTypeArguments(); |
1847 List<Type> tvars2 = st2.getTypeArguments(); |
1849 List<Type> tvars2 = st2.getTypeArguments(); |