Skip to content

Keep nested cases in their match after a dedented body - #1672

Merged
Lorenzobattistela merged 1 commit into
bendlang:mainfrom
oxura:fix/1668-format-layout-20261017
Oct 19, 2026
Merged

Lorenzobattistela merged 1 commit into
bendlang:mainfrom
oxura:fix/1668-format-layout-20261017

Conversation

@oxura

@oxura oxura commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Keep each match indentation path instead of discarding it when an arm body dedents. This also covers arms at different source columns, a dedented nested match, and a nested empty match.

The report now passes --fix with 0 findings and still prints 2n. I checked all four input combinations through the compiled JS module.

Checks: bun test tools/bend-lint --timeout 30000 — 130 passed, none skipped. Temporary files were on a private tmpfs because the checkout is on NTFS. bun gates/repo.ts — 54/54.

Fixes #1668.

@Lorenzobattistela
Lorenzobattistela merged commit 24a997f into bendlang:main Oct 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bend-lint format/layout: an under-indented case body moves the next case into the outer match

2 participants