Skip to content

Remove maxArg from syntax-description in cases where it is unbound#6092

Merged
olehermanse merged 1 commit intocfengine:masterfrom
SimonThalvorsen:master
Apr 24, 2026
Merged

Remove maxArg from syntax-description in cases where it is unbound#6092
olehermanse merged 1 commit intocfengine:masterfrom
SimonThalvorsen:master

Conversation

@SimonThalvorsen
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread libpromises/syntax.c
@@ -1293,9 +1293,12 @@ static JsonElement *FnCallTypeToJson(const FnCallType *fn_syntax)
JsonObjectAppendArray(json_fn, "parameters", params);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could also have an assert here;

if (fn_syntax->argc.min == -1)
{
    assert(fn_syntax->argc.max == -1);
}

@olehermanse olehermanse merged commit d5ea5c2 into cfengine:master Apr 24, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants