Repository navigation
On a producer, a parent fixed to null is the absent parent: the constructor takes none and depends on nothing (D214, part of #3122) - #3588
Merged
Conversation
added 2 commits
November 24, 2026 04:55
…ructor takes none, lands on the produced type and depends on nothing (D214, part of #3122)
This was referenced Nov 24, 2026
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.
Part of #3122, which stays open for the second half of D214.
Ruled (D214):
param N fixed nullon the resource parameter of a producer says the parent is absent. The constructor takes no parent, lands on the produced type, and the value it returns depends on nothing.Before: refused ("receives a modeled resource; a resource is passed by the value that owns it, never fixed"), and with
rename newthe producer collided with the parent's ownnew("function 'Easy.new' is already defined").Now:
How. One rule in four places that each decided "this parameter receives a resource" on their own: Sema's
facade_param_receives, and the renderer'sfacade_render_receiver,facade_render_receives_anyandfacade_render_item_deps. A parameter the contract fixes is the facade's argument, received from nobody. The refusal stays for everything that is not a producer (err_c_facade_fixed_receiverstill passes), and for a value other thannull.Not in this PR (still D214, recorded on the issue): two fn items for one C function, so the parented constructor can stand beside this one; the version floor on the claim; and the spec words for §16.2b.11, which go to Eric as a diff.
Test.
behav_d214_producer_with_absent_parent(fails on main with the collision; leak count 0 under the debug allocator).Evidence at 81c0481. The 36 tests that use fixed arguments or D214 pass;
:native-compile-error-tests,:behavior-tests,:validate-all-tests, pre-checks green; battery green; linux-aarch64 container leg green (:build,:behavior-tests,:native-compile-error-tests);:release-checkssurvey: all targets green.