Skip to content

Commit bb7e0c6

Browse files
authored
Add regression test for 3041. (#3045)
1 parent f7a9301 commit bb7e0c6

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Fixed
66
* Equals sign should only be on same line if last tuple is multiline. [#3040](https://github.com/fsprojects/fantomas/issues/3040)
7+
* Return type should go on next line. [#3041](https://github.com/fsprojects/fantomas/issues/3041)
78

89
## 6.3.0-alpha-007 - 2024-01-27
910

src/Fantomas.Core.Tests/TypeDeclarationTests.fs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3615,3 +3615,31 @@ type R =
36153615
F2: int
36163616
F3: int }
36173617
"""
3618+
3619+
[<Test>]
3620+
let ``long tupled member where tuple fits on single line but return type doesn't, 3041`` () =
3621+
formatSourceString
3622+
"""
3623+
type FSharpChecker with
3624+
3625+
member this.ParseAndCheckDocument
3626+
(
3627+
filePath: string,
3628+
sourceText: string,
3629+
options: FSharpProjectOptions,
3630+
allowStaleResults: bool
3631+
) : Async<(FSharpParseFileResults * ParsedInput * FSharpCheckFileResults) option> =
3632+
()
3633+
"""
3634+
config
3635+
|> prepend newline
3636+
|> should
3637+
equal
3638+
"""
3639+
type FSharpChecker with
3640+
3641+
member this.ParseAndCheckDocument
3642+
(filePath: string, sourceText: string, options: FSharpProjectOptions, allowStaleResults: bool)
3643+
: Async<(FSharpParseFileResults * ParsedInput * FSharpCheckFileResults) option> =
3644+
()
3645+
"""

0 commit comments

Comments
 (0)