diff --git a/CHANGELOG.md b/CHANGELOG.md index f0443d1fb..85693622c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [8.0.0-alpha-006] - 2026-03-09 + +### Fixed + +- Space between uppercase function name and uppercase parameter was dropped. [#3264](https://github.com/fsprojects/fantomas/pull/3264) + ## [8.0.0-alpha-005] - 2026-03-09 ### Fixed diff --git a/src/Fantomas.Core.Tests/LetBindingTests.fs b/src/Fantomas.Core.Tests/LetBindingTests.fs index 70bb61dcb..975cf752f 100644 --- a/src/Fantomas.Core.Tests/LetBindingTests.fs +++ b/src/Fantomas.Core.Tests/LetBindingTests.fs @@ -2324,3 +2324,13 @@ let processSnippetLine let lineStr = lines.[line] () """ + +[] +let ``uppercase function name with uppercase parameter should preserve space`` () = + formatSourceString "let F P = 1" config + |> prepend newline + |> should + equal + """ +let F P = 1 +""" diff --git a/src/Fantomas.Core/CodePrinter.fs b/src/Fantomas.Core/CodePrinter.fs index 432a7eef4..6dbbca803 100644 --- a/src/Fantomas.Core/CodePrinter.fs +++ b/src/Fantomas.Core/CodePrinter.fs @@ -2914,7 +2914,8 @@ let genBinding (b: BindingNode) (ctx: Context) : Context = | _, Pattern.Paren _ | _, Pattern.Unit _ -> spaceBefore | _, Pattern.Named _ - | _, Pattern.Wild _ -> true + | _, Pattern.Wild _ + | _, Pattern.LongIdent _ -> true | content, _ -> match List.tryLast content with | None -> false