Skip to content

[Repo Assist] Add regression test for index-without-dot with variable key and unit args (#2519)#3311

Open
github-actions[bot] wants to merge 1 commit intomainfrom
repo-assist/regression-test-2519-index-without-dot-unit-args-ba6af2cf33ddbc5c
Open

[Repo Assist] Add regression test for index-without-dot with variable key and unit args (#2519)#3311
github-actions[bot] wants to merge 1 commit intomainfrom
repo-assist/regression-test-2519-index-without-dot-unit-args-ba6af2cf33ddbc5c

Conversation

@github-actions
Copy link
Contributor

🤖 This is an automated PR from Repo Assist.

Closes #2519 (regression test only — fix already shipped in #3259)

Summary

Adds a regression test for the specific scenario reported in #2519: using a variable as the index key in dict[key] syntax followed by unit argument(s) should not add spurious spaces.

Before fix (pre-#3259):

dict [ key ] () ()

After fix (post-#3259):

dict[key] () ()

Root Cause

The fix in PR #3259 modified ASTTransformer.fs and CodePrinter.fs to stop flattening through IndexWithoutDot nodes, preventing spurious space insertion around variable-key index expressions.

What This PR Does

  • Adds a regression test index without dot with variable key followed by two unit arguments, 2519 to IndexSyntaxTests.fs
  • Adds a CHANGELOG entry under [Unreleased] > Fixed (as requested by @nojaf)

Test Status

Build and tests passed locally:

  • Build: ✅ succeeded
  • Tests: ✅ 2740 passed, 0 failed, 0 skipped

Generated by Repo Assist ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@4957663821dbb3260348084fa2f1659701950fef

…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>
@nojaf nojaf marked this pull request as ready for review March 24, 2026 07:55
@nojaf nojaf closed this Mar 24, 2026
@nojaf nojaf reopened this Mar 24, 2026
@nojaf
Copy link
Contributor

nojaf commented Mar 24, 2026

/repo-assist format the code

@github-actions
Copy link
Contributor Author

🚀 Repo Assist has started processing this issue comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fantomas inserts space that breaks index lookups (without a dot)

1 participant