Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- NamedIndexedPropertySet with two SynLongIdent removed space. [#3273](https://github.com/fsprojects/fantomas/issues/3273)
- `%%` (double-percent) infix operator moved to new line, producing invalid F#. [#2107](https://github.com/fsprojects/fantomas/issues/2107)
- Indentation warning when formatting `match` with long anonymous record discriminant. [#1903](https://github.com/fsprojects/fantomas/issues/1903)
- Index-without-dot with variable key followed by unit arguments added spurious spaces, e.g. `dict[key] () ()` became `dict [ key ] () ()`. [#2519](https://github.com/fsprojects/fantomas/issues/2519)

## [8.0.0-alpha-007] - 2026-03-10

Expand Down
19 changes: 19 additions & 0 deletions src/Fantomas.Core.Tests/IndexSyntaxTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -315,3 +315,22 @@ prepConfigs[ 1 ] host days
"""
prepConfigs[1] host days
"""

[<Test>]
let ``index without dot with variable key followed by two unit arguments, 2519`` () =
formatSourceString
"""
let test (dict: System.Collections.Generic.IDictionary<string, unit -> unit -> unit>) =
let key = "foo"
dict[key] () ()
"""
config
|> prepend newline
|> should
equal
"""
let test (dict: System.Collections.Generic.IDictionary<string, unit -> unit -> unit>) =
let key = "foo"
dict[key] () ()
"""