Skip to content

Fix index-without-dot followed by application arguments#3259

Merged
nojaf merged 2 commits into
fsprojects:mainfrom
nojaf:fix-index-without-dot
Mar 9, 2026
Merged

Fix index-without-dot followed by application arguments#3259
nojaf merged 2 commits into
fsprojects:mainfrom
nojaf:fix-index-without-dot

Conversation

@nojaf

@nojaf nojaf commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

The App active pattern flattened through IndexWithoutDot expressions, losing the no-space indexing semantics. This caused inconsistent formatting: prepConfigs[1] host worked but prepConfigs[1] host port produced prepConfigs [ 1 ] host port.

Stop flattening in the App active pattern when hitting IndexWithoutDot, remove the ExprNestedIndexWithoutDotNode workaround, and handle IndexWithoutDot as a function expression in the code printer.

nojaf added 2 commits March 9, 2026 15:06
The App active pattern flattened through IndexWithoutDot expressions,
losing the no-space indexing semantics. This caused inconsistent
formatting: `prepConfigs[1] host` worked but `prepConfigs[1] host port`
produced `prepConfigs [ 1 ] host port`.

Stop flattening in the App active pattern when hitting IndexWithoutDot,
remove the ExprNestedIndexWithoutDotNode workaround, and handle
IndexWithoutDot as a function expression in the code printer.
@nojaf nojaf merged commit 3b78c64 into fsprojects:main Mar 9, 2026
6 checks passed
github-actions Bot added a commit that referenced this pull request Mar 24, 2026
…args, 2519

Add a regression test for the specific scenario from issue #2519: using
a variable as the index key followed by unit arguments should not add
spurious spaces around the index.

The bug was fixed by PR #3259 (Fix index-without-dot followed by
application arguments). This test ensures the specific pattern
reported in #2519 remains correctly formatted.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
github-actions Bot added a commit that referenced this pull request Mar 24, 2026
…args, 2519

Add a regression test for the specific scenario from issue #2519: using
a variable as the index key followed by unit arguments should not add
spurious spaces around the index.

The bug was fixed by PR #3259 (Fix index-without-dot followed by
application arguments). This test ensures the specific pattern
reported in #2519 remains correctly formatted.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant