Repository navigation
Slicer: a brace type in a zig result type or a swift closure default is no body start (Part of #6432) - #6440
Conversation
…is no body start (Part of #6432) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…rt of #6432) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
This PR conflicts with main, so no checks ran. Merge origin/main into it and regenerate generated files with their tools (never hand-merge them), then push. |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
No description provided. |
|
No description provided. |
|
This PR conflicts with main, so no checks ran. Merge origin/main into it and regenerate generated files with their tools (never hand-merge them), then push. |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
No description provided. |
|
No description provided. |
|
No description provided. |
|
No description provided. |
|
No description provided. |
Part of #6432. No checklist key on the issue.
In the brace slicer, the first
{after a signature was taken as the body start. A zig type brace in the result type (error{..}!T,struct{..},union(enum){..},enum(u8){..},opaque{}) and a swift closure parameter default (cb: () -> Void = {}) ended the unit on the signature line, so the body's calls landed on the previous function._slice_by_braces, a depth-0{afterstruct|union|enum|opaque|error(or the)ofunion(..)/enum(..)) is stepped over as a balanced type brace (_zig_opens_type_brace, gated to zig). Mirrors the existing go branch.Class / Sibling gaps
Class: the Mode-B brace slicer reading a non-body
{in a signature as the body start. Handled here: zig type braces (all keywords above), swift closure defaults. Go was already handled. Sibling gap: rust const-generic braces in a signature (-> Foo<{ N + 1 }>) reproduce the same truncation; not fixed because a trailing,before{is legal in awhereclause, so a cheap look-back rule is unsafe and it needs an angle-depth walk. No burned mainframe estate needs it.Tests
tests/extraction/languages/test_slice_signature_braces_6432.py(17 cases: each zig type form, multi-line error set, plain/bodyless unchanged, calls land on the right unit, unbalanced-brace bound, swift defaults and protocol requirements). Existing zig/swift strict tests pass.Golden
Re-blessed via
golden-lock.sh crucible_check.py --update --yes.scope_check.pyagainst origin/main: zig 4450 and swift 112 differences, plus repo-wide rollup, PageRank and coordinate shifts that follow from the new edges. The java/groovy call differences it listed came from main's #6424 (merged after my base); none remain in the diff after merging main. A controlcrucible_checkon pristine main passed at similar box load.Gates:
pr_gates --fast7/7,--ratchets9/9; tree-wide guards and time ratchet pass.🤖 Generated with Claude Code