Skip to content

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekseyTs committed Mar 28, 2024
1 parent 7a4fcb0 commit 6b30a4f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Compilers/CSharp/Portable/Binder/Binder_Expressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3339,7 +3339,13 @@ private void CheckAndCoerceArguments<TMember>(
var kind = result.ConversionForArg(arg);
BoundExpression argument = arguments[arg];

if (argument is not BoundArgListOperator && !argument.HasAnyErrors)
if (argument is BoundArgListOperator)
{
Debug.Assert(kind.IsIdentity);
Debug.Assert(!argument.NeedsToBeConverted());
continue;
}
else if (!argument.HasAnyErrors)
{
var argRefKind = analyzedArguments.RefKind(arg);

Expand Down Expand Up @@ -3414,6 +3420,7 @@ private void CheckAndCoerceArguments<TMember>(
{
Debug.Assert(result.ParamsElementTypeOpt.HasType);
Debug.Assert(result.ParamsElementTypeOpt.Type != (object)ErrorTypeSymbol.EmptyParamsCollectionElementTypeSentinel);
Debug.Assert(argument.Kind is not (BoundKind.OutVariablePendingInference or BoundKind.OutDeconstructVarPendingInference or BoundKind.DiscardExpression));

if (!parameters[paramNum].Type.IsSZArray())
{
Expand Down

0 comments on commit 6b30a4f

Please sign in to comment.