1101 Symbol impl = null; |
1101 Symbol impl = null; |
1102 for (List<Type> is = types.interfaces(c.type); |
1102 for (List<Type> is = types.interfaces(c.type); |
1103 impl == null && is.nonEmpty(); |
1103 impl == null && is.nonEmpty(); |
1104 is = is.tail) { |
1104 is = is.tail) { |
1105 TypeSymbol i = is.head.tsym; |
1105 TypeSymbol i = is.head.tsym; |
1106 for (Scope.Entry e = i.members().lookup(name); |
1106 impl = implementedIn(i, types); |
1107 impl == null && e.scope != null; |
1107 if (impl == null) |
1108 e = e.next()) { |
1108 impl = implemented(i, types); |
1109 if (this.overrides(e.sym, (TypeSymbol)owner, types, true) && |
1109 } |
1110 // FIXME: I suspect the following requires a |
1110 return impl; |
1111 // subst() for a parametric return type. |
1111 } |
1112 types.isSameType(type.getReturnType(), |
1112 |
1113 types.memberType(owner.type, e.sym).getReturnType())) { |
1113 public Symbol implementedIn(TypeSymbol c, Types types) { |
1114 impl = e.sym; |
1114 Symbol impl = null; |
1115 } |
1115 for (Scope.Entry e = c.members().lookup(name); |
1116 if (impl == null) |
1116 impl == null && e.scope != null; |
1117 impl = implemented(i, types); |
1117 e = e.next()) { |
|
1118 if (this.overrides(e.sym, (TypeSymbol)owner, types, true) && |
|
1119 // FIXME: I suspect the following requires a |
|
1120 // subst() for a parametric return type. |
|
1121 types.isSameType(type.getReturnType(), |
|
1122 types.memberType(owner.type, e.sym).getReturnType())) { |
|
1123 impl = e.sym; |
1118 } |
1124 } |
1119 } |
1125 } |
1120 return impl; |
1126 return impl; |
1121 } |
1127 } |
1122 |
1128 |