Lines 3188-3193
Link Here
|
3188 |
return problemMethod; |
3188 |
return problemMethod; |
3189 |
} |
3189 |
} |
3190 |
|
3190 |
|
|
|
3191 |
// caveat: this is not a direct implementation of JLS |
3191 |
protected final MethodBinding mostSpecificMethodBinding(MethodBinding[] visible, int visibleSize, TypeBinding[] argumentTypes, InvocationSite invocationSite, ReferenceBinding receiverType) { |
3192 |
protected final MethodBinding mostSpecificMethodBinding(MethodBinding[] visible, int visibleSize, TypeBinding[] argumentTypes, InvocationSite invocationSite, ReferenceBinding receiverType) { |
3192 |
int[] compatibilityLevels = new int[visibleSize]; |
3193 |
int[] compatibilityLevels = new int[visibleSize]; |
3193 |
for (int i = 0; i < visibleSize; i++) |
3194 |
for (int i = 0; i < visibleSize; i++) |
Lines 3324-3331
Link Here
|
3324 |
original2 = original.computeSubstitutedMethod(original2, environment()); |
3325 |
original2 = original.computeSubstitutedMethod(original2, environment()); |
3325 |
if (original2 == null || !original.areParameterErasuresEqual(original2)) |
3326 |
if (original2 == null || !original.areParameterErasuresEqual(original2)) |
3326 |
continue nextSpecific; // current does not override next |
3327 |
continue nextSpecific; // current does not override next |
3327 |
if (!original.returnType.isCompatibleWith(original2.returnType)) // 15.12.2 |
3328 |
if (!original.returnType.isCompatibleWith(original2.returnType) && |
|
|
3329 |
!original.returnType.erasure().isCompatibleWith(original2.returnType.erasure())) { |
3330 |
// 15.12.2 |
3328 |
continue nextSpecific; // choose original2 instead |
3331 |
continue nextSpecific; // choose original2 instead |
|
|
3332 |
} |
3329 |
if (original.thrownExceptions != original2.thrownExceptions) { |
3333 |
if (original.thrownExceptions != original2.thrownExceptions) { |
3330 |
if (mostSpecificExceptions == null) |
3334 |
if (mostSpecificExceptions == null) |
3331 |
mostSpecificExceptions = original.thrownExceptions; |
3335 |
mostSpecificExceptions = original.thrownExceptions; |