Lines 399-404
Link Here
|
399 |
*/ |
399 |
*/ |
400 |
public MethodBinding getExactConstructor(TypeBinding[] argumentTypes) { |
400 |
public MethodBinding getExactConstructor(TypeBinding[] argumentTypes) { |
401 |
int argCount = argumentTypes.length; |
401 |
int argCount = argumentTypes.length; |
|
|
402 |
MethodBinding match = null; |
402 |
|
403 |
|
403 |
if ((tagBits & TagBits.AreMethodsComplete) != 0) { // have resolved all arg types & return type of the methods |
404 |
if ((tagBits & TagBits.AreMethodsComplete) != 0) { // have resolved all arg types & return type of the methods |
404 |
long range; |
405 |
long range; |
Lines 409-416
Link Here
|
409 |
TypeBinding[] toMatch = method.parameters; |
410 |
TypeBinding[] toMatch = method.parameters; |
410 |
for (int iarg = 0; iarg < argCount; iarg++) |
411 |
for (int iarg = 0; iarg < argCount; iarg++) |
411 |
if (toMatch[iarg] != argumentTypes[iarg]) |
412 |
if (toMatch[iarg] != argumentTypes[iarg]) |
412 |
continue nextMethod; |
413 |
continue nextMethod;; |
413 |
return method; |
414 |
if (match != null) return null; // collision case |
|
|
415 |
match = method; |
414 |
} |
416 |
} |
415 |
} |
417 |
} |
416 |
} |
418 |
} |
Lines 422-433
Link Here
|
422 |
if (toMatch.length == argCount) { |
424 |
if (toMatch.length == argCount) { |
423 |
for (int p = 0; p < argCount; p++) |
425 |
for (int p = 0; p < argCount; p++) |
424 |
if (toMatch[p] != argumentTypes[p]) |
426 |
if (toMatch[p] != argumentTypes[p]) |
425 |
continue nextMethod; |
427 |
continue nextMethod;; |
426 |
return method; |
428 |
if (match != null) return null; // collision case |
|
|
429 |
match = method; |
427 |
} |
430 |
} |
428 |
} |
431 |
} |
429 |
} |
432 |
} |
430 |
return null; |
433 |
return match; |
431 |
} |
434 |
} |
432 |
|
435 |
|
433 |
/** |
436 |
/** |