Index: compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java,v retrieving revision 1.31 diff -u -r1.31 Statement.java --- compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java 21 Oct 2004 13:34:43 -0000 1.31 +++ compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java 24 Jan 2005 15:33:39 -0000 @@ -63,7 +63,9 @@ if (argLength >= paramLength) { // right number of arguments - could be inexact - pass argument as is TypeBinding lastType = arguments[varArgIndex].resolvedType; - if (lastType == NullBinding || varArgsType.dimensions() == lastType.dimensions()) { + if (lastType == NullBinding + || (varArgsType.dimensions() == lastType.dimensions() + && lastType.isCompatibleWith(varArgsType))) { // foo(1, new int[]{2, 3}) or foo(1, null) --> last arg is passed as-is arguments[varArgIndex].generateCode(currentScope, codeStream, true); break generateVarargsArgument;