Lines 326-334
Link Here
|
326 |
MethodBinding concreteMethod = this.type.isInterface() || methods[0].isAbstract() ? null : methods[0]; |
326 |
MethodBinding concreteMethod = this.type.isInterface() || methods[0].isAbstract() ? null : methods[0]; |
327 |
if (concreteMethod == null) { |
327 |
if (concreteMethod == null) { |
328 |
MethodBinding bestAbstractMethod = length == 1 ? methods[0] : findBestInheritedAbstractMethod(methods, length); |
328 |
MethodBinding bestAbstractMethod = length == 1 ? methods[0] : findBestInheritedAbstractMethod(methods, length); |
329 |
if (bestAbstractMethod == null) { |
329 |
boolean noMatch = bestAbstractMethod == null; |
330 |
problemReporter().inheritedMethodsHaveIncompatibleReturnTypes(this.type, methods, length); |
330 |
if (noMatch) |
331 |
} else if (mustImplementAbstractMethod(bestAbstractMethod.declaringClass)) { |
331 |
bestAbstractMethod = methods[0]; |
|
|
332 |
if (mustImplementAbstractMethod(bestAbstractMethod.declaringClass)) { |
332 |
TypeDeclaration typeDeclaration = this.type.scope.referenceContext; |
333 |
TypeDeclaration typeDeclaration = this.type.scope.referenceContext; |
333 |
MethodBinding superclassAbstractMethod = methods[0]; |
334 |
MethodBinding superclassAbstractMethod = methods[0]; |
334 |
if (superclassAbstractMethod == bestAbstractMethod || superclassAbstractMethod.declaringClass.isInterface()) { |
335 |
if (superclassAbstractMethod == bestAbstractMethod || superclassAbstractMethod.declaringClass.isInterface()) { |
Lines 346-351
Link Here
|
346 |
problemReporter().abstractMethodMustBeImplemented(this.type, bestAbstractMethod, superclassAbstractMethod); |
347 |
problemReporter().abstractMethodMustBeImplemented(this.type, bestAbstractMethod, superclassAbstractMethod); |
347 |
} |
348 |
} |
348 |
} |
349 |
} |
|
|
350 |
} else if (noMatch) { |
351 |
problemReporter().inheritedMethodsHaveIncompatibleReturnTypes(this.type, methods, length); |
349 |
} |
352 |
} |
350 |
return; |
353 |
return; |
351 |
} |
354 |
} |