mirror of
https://github.com/actions/runner.git
synced 2025-12-16 06:57:25 +00:00
Update src/Sdk/DTExpressions2/Expressions2/Sdk/Functions/Case.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -12,7 +12,7 @@ namespace GitHub.DistributedTask.Expressions2.Sdk.Functions
|
|||||||
out ResultMemory resultMemory)
|
out ResultMemory resultMemory)
|
||||||
{
|
{
|
||||||
resultMemory = null;
|
resultMemory = null;
|
||||||
// Validate argument count - must be odd (pairs of predicate-result plus default)
|
// Validate argument count - must be odd (pairs of predicate-result plus default)
|
||||||
if (Parameters.Count % 2 == 0)
|
if (Parameters.Count % 2 == 0)
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException("case requires an odd number of arguments");
|
throw new InvalidOperationException("case requires an odd number of arguments");
|
||||||
|
|||||||
Reference in New Issue
Block a user