Repository navigation
The compiler's private functions do not restate their return types (closes #3061) - #3620
Merged
Merged
Conversation
added 4 commits
November 25, 2026 13:05
…ith fix-ceremony finds, round by round, the ones the program needs, and the sweep removes the rest (#3061)
…s in FnAbi and TypeLayout, no convention changed
…heir return types
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 #3061: the last of its eight rewrites (an inferable return type) is run over
src/.The tool.
with fix-ceremony --applyremoved every candidate and, when the program then stopped checking, put all of them back; oversrc/that was 1,207 of 1,207. It now finds the ones the program needs, round by round, from the compile it already does: a function that infers another type than it declared, and a function an error names (a caller of a function with no type is refused at the call, D43). Only those go back.The sweep. About 1,200 restated return types removed from private functions in 110 files of
src/; 6 kept, each reported with its reason.pubsignatures keep theirs. The result checks under the installed compiler and the pinned seed. The ABI source hash is re-recorded:FnAbi.withandTypeLayout.withchanged by removed return types only, no convention.Cleaned in the same file.
src/CeremonyFix.withheld four index loops over parallel lists and two index comprehensions. They are gone: the per-edit facts are in records, the put-back marks are keys, the edit order issort_by. The census's index-loop count forsrcfalls.One line of std.
Enumerated.nextrestated its index's type; the census measured it for the first time because the compiler now instantiates it.Test.
behav_3061_fix_ceremony_cli: two functions that call each other keep their types, and a function beside them that needs none loses its own (it used to be all three kept).Evidence. Battery GREEN on e67a1c531, the same tree as this branch's top (
git diffbetween them is empty);:release-checksgreen there too. The base of the stack, #3619, is merged.