### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java,v retrieving revision 1.299 diff -u -r1.299 Scope.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 29 Jan 2007 07:37:02 -0000 1.299 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 23 Feb 2007 10:05:43 -0000 @@ -1108,7 +1108,7 @@ } currentType = currentType.superclass(); } - + // if found several candidates, then eliminate those not matching argument types int foundSize = found.size; MethodBinding[] candidates = null; @@ -1235,6 +1235,17 @@ && parameterCompatibilityLevel(mostSpecificMethod, argumentTypes) > COMPATIBLE) { // see if there is a better match in the interfaces - see AutoBoxingTest 99 return findDefaultAbstractMethod(receiverType, selector, argumentTypes, invocationSite, classHierarchyStart, found, mostSpecificMethod); + } else if (isCompliant14 && classHierarchyStart.isAbstract()) { + if (mostSpecificMethod.isValidBinding()) { + // see if there is a better match in the interfaces - see LookupTest#81 + return findDefaultAbstractMethod(receiverType, selector, argumentTypes, invocationSite, classHierarchyStart, found, mostSpecificMethod); + } else { + // see if there is still a match in the interfaces - see LookupTest#84 + MethodBinding interfaceMethod = findDefaultAbstractMethod(receiverType, selector, argumentTypes, invocationSite, classHierarchyStart, found, null); + if (interfaceMethod != null && interfaceMethod.isValidBinding() /* else return the same error as before */) { + return interfaceMethod; + } + } } return mostSpecificMethod; }