Permalink
Browse files

Fix bug in CallBuilder.

  • Loading branch information...
siegfriedpammer committed Nov 4, 2018
1 parent ee584f3 commit 44aa391a854652efe70eae0316c07e596a8081d8
Showing with 2 additions and 2 deletions.
  1. +2 −2 ICSharpCode.Decompiler/CSharp/CallBuilder.cs
@@ -787,7 +787,7 @@ enum CallTransformation
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 @@ ExpressionWithResolveResult HandleConstructorCall(ExpectedTargetDetails expected
} 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;

0 comments on commit 44aa391

Please sign in to comment.