Skip to content

Conversation

@thevilledev
Copy link
Contributor

Update OpCall to properly handle nil values passed to variadic functions. Previously, passing nil as the last argument caused an index out of range panic, and a single nil argument was incorrectly treated as a nil slice. Added regression tests.

FIxes #817.

Update OpCall to properly handle nil values passed to variadic
functions. Previously, passing nil as the last argument caused
an index out of range panic, and a single nil argument was
incorrectly treated as a nil slice. Added regression tests.

Signed-off-by: Ville Vesilehto <[email protected]>
@antonmedv antonmedv merged commit cf589a4 into expr-lang:master Dec 4, 2025
15 checks passed
MasonM added a commit to MasonM/argo-workflows that referenced this pull request Dec 16, 2025
As @dmarquez-splunk discovered, the Sprig upgrade in argoproj#14307 introduced a
regression when evaluating an expression that has a call to a variadic
Sprig function with `nil`. This was fixed in
expr-lang/expr#868, which was released as
[v1.17.7](https://github.com/expr-lang/expr/releases/tag/v1.17.7).

I also added a test case to prevent regressions.

Signed-off-by: Mason Malone <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: inconsistencies with variadic function arguments

2 participants