Repository navigation
List.join is declared in the standard library for List[str] and its built-in is deleted (#3483); a Never type argument is not the wrong instantiation (#3508, D143) - #3510
Merged
Conversation
added 3 commits
November 21, 2026 06:29
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 #3483 (D110), and a fix to #3509.
List.joinis declared in std.collections in animpl List[str]block, over the runtime's join. Deleted from the compiler: its entry inbuiltin_method_intrinsic, the name-based return-type entry, its special case in the built-in call check, theBuiltinSigsrow, theMirIntrinsicandCcBuiltinmembers and the arms in both code generators. The C header's prototype now matches the runtime source (uint8_t *, as the other list functions).A list that does not hold text keeps the sentence that says what to do (
List.join joins str elements, and this List holdsi32; turn each element into text first …,err_vec_join_non_str), ahead of the general refusal.A regression #3509 introduced, found by the battery.
examples/json-parserhas a function with an inferred return type that joins its own results. In the open pass over a self-calling body (D143) a call of the function itself readsNever, so the receiver is aList[Never], and the check added in #3509 refused it as another instantiation. The same held on main for any user type (Box { v: f(n - 1) }.shout()withshoutdeclared forBox[str]). A type argument that isNeveris a self-call the open pass has not typed yet: the check lets it through, and the pass that follows checks the real instantiation. The example is unchanged.Tests:
behav_3483_list_join_declared(no leaks under the debug allocator),behav_3483_join_in_a_self_calling_function(join and a user type's instantiation method in self-calling functions); the C-backend tests and the examples lane pass.Fourteen built-ins have moved (three on
List, eleven onstr).Battery green;
:release-checksgreen.