Browse Source

Fix bug in CallBuilder.

pull/1317/head
Siegfried Pammer 7 years ago
parent
commit
44aa391a85
  1. 4
      ICSharpCode.Decompiler/CSharp/CallBuilder.cs

4
ICSharpCode.Decompiler/CSharp/CallBuilder.cs

@ -787,7 +787,7 @@ namespace ICSharpCode.Decompiler.CSharp @@ -787,7 +787,7 @@ namespace ICSharpCode.Decompiler.CSharp
OverloadResolutionErrors errors;
while ((errors = IsUnambiguousCall(expectedTargetDetails, method, targetResolveResult, typeArguments,
argumentList.Arguments, argumentList.ArgumentNames, argumentList.FirstOptionalArgumentIndex, out foundMethod,
out var bestCandidateIsExpandedForm)) != OverloadResolutionErrors.None && bestCandidateIsExpandedForm == argumentList.IsExpandedForm)
out var bestCandidateIsExpandedForm)) != OverloadResolutionErrors.None || bestCandidateIsExpandedForm != argumentList.IsExpandedForm)
{
switch (errors) {
case OverloadResolutionErrors.TypeInferenceFailed:
@ -1164,7 +1164,7 @@ namespace ICSharpCode.Decompiler.CSharp @@ -1164,7 +1164,7 @@ namespace ICSharpCode.Decompiler.CSharp
} else {
while (IsUnambiguousCall(expectedTargetDetails, method, null, Empty<IType>.Array, argumentList.Arguments,
argumentList.ArgumentNames, argumentList.FirstOptionalArgumentIndex, out _,
out var bestCandidateIsExpandedForm) != OverloadResolutionErrors.None && bestCandidateIsExpandedForm == argumentList.IsExpandedForm)
out var bestCandidateIsExpandedForm) != OverloadResolutionErrors.None || bestCandidateIsExpandedForm != argumentList.IsExpandedForm)
{
if (argumentList.FirstOptionalArgumentIndex >= 0) {
argumentList.FirstOptionalArgumentIndex = -1;

Loading…
Cancel
Save