Repository navigation
str.contains, starts_with and ends_with are declared in the standard library and their built-ins are deleted (#3483); six contract help fixtures (#3129) - #3495
Merged
Conversation
added 5 commits
November 20, 2026 19:31
This was referenced Nov 21, 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 #3483 (D110) and of #3129.
Three
strmethods move to std.string, each over the runtime call its built-in made (with_str_contains_ref,with_str_starts_with_ref,with_str_ends_with_ref), and the compiler's copies are deleted: the table entries, threeBuiltinSigsrows, theMirIntrinsicandCcBuiltinmembers and the arms in both code generators.What
:release-checkstaught (the first attempt was red there, not in the battery). A unit compiled without the prelude (the Clang bridge object, the STC corpus's hand-written test harness) called these methods. The built-in table was gone, but a second, name-based return-type table still typed the call asbool, so it type-checked with nothing to call and lowering aborted with an internal error. Fixed at the cause:unknown method 'starts_with' for type '&str'with the help "strmethods are declared in std.string, which this unit does not import (it is compiled without the prelude): adduse std.string"; a plain typo keeps the ordinary error;std.string.Tests:
behav_3483_str_predicates_declared(a call, at compile time,in, as a method value, on a view, in a pipeline); the C-backend tests pass.Six fixtures (#3129) pinning a contract refusal with its help line: the five buffer-field refusals and a fixed argument on an in-place initializer.
Battery green;
:release-checksgreen (twice, on successive bases).