Lines 63-69
Link Here
|
63 |
if (argLength >= paramLength) { |
63 |
if (argLength >= paramLength) { |
64 |
// right number of arguments - could be inexact - pass argument as is |
64 |
// right number of arguments - could be inexact - pass argument as is |
65 |
TypeBinding lastType = arguments[varArgIndex].resolvedType; |
65 |
TypeBinding lastType = arguments[varArgIndex].resolvedType; |
66 |
if (lastType == NullBinding || varArgsType.dimensions() == lastType.dimensions()) { |
66 |
if (lastType == NullBinding |
|
|
67 |
|| (varArgsType.dimensions() == lastType.dimensions() |
68 |
&& lastType.isCompatibleWith(varArgsType))) { |
67 |
// foo(1, new int[]{2, 3}) or foo(1, null) --> last arg is passed as-is |
69 |
// foo(1, new int[]{2, 3}) or foo(1, null) --> last arg is passed as-is |
68 |
arguments[varArgIndex].generateCode(currentScope, codeStream, true); |
70 |
arguments[varArgIndex].generateCode(currentScope, codeStream, true); |
69 |
break generateVarargsArgument; |
71 |
break generateVarargsArgument; |