Repository navigation
A variadic case may state fills T: the case presents the value the callee wrote (closes #3119) - #3632
Merged
Merged
Conversation
added 3 commits
November 26, 2026 06:29
…ec's status note says implemented (#3119)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3119. The sentence was blessed by Eric on 2026-11-25 and is in §16.2b.5 since spec v7.90; its status note now says implemented.
What a contract writes.
What the program writes.
easy.getinfo(CURLINFO_RESPONSE_CODE)is aResult[c_long, GetinfoError]: With passes the address of a zeroedc_longas the variadic argument and presents the value when the call returned itsok.Rules enforced.
Tis an integer, a float, or a C record whose all-zero bytes are a value (the rule forfillson a fixed parameter); a pointer is refused with a help line. A function with nookcontract cannot state the case.Changes. The grammar reads
fillsbefore the type;FacadeVariadicKind.Fills; the renderer emits the case as aResultand the operation's error type, for a resource's method and for a free function. A variadic contract with anokno longer trips the check that expects one bridge function (it renders one per case).Tests.
behav_3119_variadic_case_fills(integer, float, record, a failed call, a method and a free function over a local header);behav_3119_libcurl_getinfo_fills(libcurl's owncurl_easy_getinfo);err_3119_fills_case_needs_ok;err_3119_fills_case_pointer. The non-variadic out-parameter the issue also names isfills param N, which exists since D198.Not covered, as the ruling says. A case that hands back a pointer the library owns (
CURLINFO_EFFECTIVE_URL) is notfillsand stays raw.Evidence. Battery GREEN on c35054a;
:release-checksgreen on the same commit; the libcurl test added after it is a test file only and passes.