Index: compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java,v retrieving revision 1.273 diff -u -r1.273 Scope.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 28 Apr 2006 14:53:28 -0000 1.273 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 4 May 2006 15:47:38 -0000 @@ -2544,12 +2544,14 @@ return true; } - if (one.isVarargs() && two.isVarargs() && oneParamsLength > twoParamsLength) { - // special case when autoboxing makes (int, int...) better than (Object...) but not (int...) or (Integer, int...) - if (((ArrayBinding) twoParams[twoParamsLength - 1]).elementsType().id != TypeIds.T_JavaLangObject) - return false; + if (one.isVarargs() && two.isVarargs()) { + if (oneParamsLength > twoParamsLength) { + // special case when autoboxing makes (int, int...) better than (Object...) but not (int...) or (Integer, int...) + if (((ArrayBinding) twoParams[twoParamsLength - 1]).elementsType().id != TypeIds.T_JavaLangObject) + return false; + } // check that each parameter before the vararg parameters are compatible (no autoboxing allowed here) - for (int i = twoParamsLength - 2; i >= 0; i--) + for (int i = (oneParamsLength > twoParamsLength ? twoParamsLength : oneParamsLength) - 2; i >= 0; i--) if (oneParams[i] != twoParams[i] && !oneParams[i].isCompatibleWith(twoParams[i])) return false; if (parameterCompatibilityLevel(one, twoParams) == NOT_COMPATIBLE