From c0237e165eb588008fc84f208d1b0541b7a32fa9 Mon Sep 17 00:00:00 2001 From: nojaf Date: Fri, 10 Jul 2020 17:41:29 +0200 Subject: [PATCH] Adding regression test for record type with attributes. Fixes #941 --- ...ineBlockBracketsOnSameColumnRecordTests.fs | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/Fantomas.Tests/MultilineBlockBracketsOnSameColumnRecordTests.fs b/src/Fantomas.Tests/MultilineBlockBracketsOnSameColumnRecordTests.fs index 8d5e76cafc..03f11e6655 100644 --- a/src/Fantomas.Tests/MultilineBlockBracketsOnSameColumnRecordTests.fs +++ b/src/Fantomas.Tests/MultilineBlockBracketsOnSameColumnRecordTests.fs @@ -608,3 +608,33 @@ let expected = TheNewValue = 1 } """ + +[] +let ``record type with attributes`` () = + formatSourceString false """ +[] +type Args = + { [] + [] + [] + Hi: int list } + +module Foo = + + let r = 3 +""" config + |> prepend newline + |> should equal """ +[] +type Args = + { + [] + [] + [] + Hi : int list + } + +module Foo = + + let r = 3 +"""