diff --git a/src/Fantomas.Core.Tests/DallasTests.fs b/src/Fantomas.Core.Tests/DallasTests.fs index 7b3aa8c704..9f5adc0e39 100644 --- a/src/Fantomas.Core.Tests/DallasTests.fs +++ b/src/Fantomas.Core.Tests/DallasTests.fs @@ -481,7 +481,6 @@ type Foo with equal """ type Foo with - member x.Bar = () """ diff --git a/src/Fantomas.Core.Tests/NewlineBetweenTypeDefinitionAndMembersTests.fs b/src/Fantomas.Core.Tests/NewlineBetweenTypeDefinitionAndMembersTests.fs index d88c1bbae1..4081e8942f 100644 --- a/src/Fantomas.Core.Tests/NewlineBetweenTypeDefinitionAndMembersTests.fs +++ b/src/Fantomas.Core.Tests/NewlineBetweenTypeDefinitionAndMembersTests.fs @@ -120,7 +120,7 @@ type Color = """ [] -let ``type augmentation with members`` () = +let ``type augmentation with members should not add newline`` () = formatSourceString false """ @@ -133,7 +133,6 @@ type HttpContext with equal """ type HttpContext with - member this.QueryString() = "?" """ @@ -232,7 +231,6 @@ type HttpContext with namespace Signature type HttpContext with - member QueryString: unit -> string """ diff --git a/src/Fantomas.Core/CodePrinter.fs b/src/Fantomas.Core/CodePrinter.fs index 6389365227..f8c6a50dd4 100644 --- a/src/Fantomas.Core/CodePrinter.fs +++ b/src/Fantomas.Core/CodePrinter.fs @@ -3535,7 +3535,7 @@ let genTypeDefn (td: TypeDefn) = header +> sepSpace +> optSingle genSingleTextNode typeName.WithKeyword - +> indentSepNlnUnindent (sepNlnBetweenTypeAndMembers typeDefnNode +> genMemberDefnList members) + +> indentSepNlnUnindent (genMemberDefnList members) |> genNode node | TypeDefn.Delegate node -> header