Repository navigation
Restore trait/impl layout scrambled by 129c4d15 - #1347
Merged
Merged
Conversation
…e, first member's parameter list rejoined 129c4d1 ("Remove legacy equals trait bodies") rewrote `Header =\n member(a: T)` as `Header: member(a:\n T)` - the header's newline moved onto the last `: ` of the first member line - and split `impl[T: Bound]` as `impl[T:\n Bound]`. The parser accepted both, so the damage survived in 45 files: 4 examples/service sources, 4 lib/std modules (builtins, collections, json, traits) and 37 tests, including copies made later (test/d_acceptance, err_iter_of_self_user_constructor). Whitespace-only repair by a With script (header split at `:` + four spaces, continuation line rejoined with one space). The deliberately aligned one-line impls in lib/std/traits.w (`impl Clone for i8: fn clone(): *self`) are untouched. Evidence: `with tokens` streams with newline tokens removed are identical for all 45 files; every touched test gives the same result under the installed `with` before and after, differing only in diagnostic line/span text; the service example builds, runs and passes its test.
Contributor
Author
|
Iterate tier: |
Contributor
Author
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.
Whitespace-only repair of the layout damage left by 129c4d1 ("Remove legacy equals trait bodies", #385).
What 129c4d1 did
It rewrote every
Header =/member(a: T) ...intoHeader: member(a:/T) ...: the=became:, the newline after the header was dropped, and the last:on the first member line became:\n. It also splitimpl[T: Bound]intoimpl[T:/Bound]. No lines were lost and no tokens changed. The parser accepted every scrambled shape (#1346), so the damage stayed in the tree. Other edits in that commit (Parser.w=rejection, render.w, parser_unit_test.w, the two newerr_*_eq_body_removed.wtests) are intact.Still damaged on main, all repaired here (45 files):
impl[T:/Clone]), json.w, traits.wThe aligned one-line impls in lib/std/traits.w (
impl Clone for i8: fn clone(): *self, Debug/Display rows) are deliberate §29.13 Form 1 bodies and are not changed.How
A With script (split the header at
:followed by four spaces; rejoin the continuation line with one space; rejoinimpl[T:+ bound).Evidence
with tokens, with newline tokens removed, is byte-identical before and after for all 45 files.git diff --word-diff=porcelainshows no added or removed words.withbefore and after. The only differences are diagnostic line numbers and span text, and every//!expectation still matches.User #1: Alice, exit 0), andwith test examples/service/test/service_test.wpasses.Draft until the seed-driven battery is posted.