diff --git a/src/Fantomas.Tests/CompilerDirectivesTests.fs b/src/Fantomas.Tests/CompilerDirectivesTests.fs index 6225e23ec7..aab914728f 100644 --- a/src/Fantomas.Tests/CompilerDirectivesTests.fs +++ b/src/Fantomas.Tests/CompilerDirectivesTests.fs @@ -2704,3 +2704,31 @@ let x = 1 let x = 1 #endif """ + +[] +let ``type definition in signature file wrapped with hash directives, 1115`` () = + formatSourceString + true + """ +namespace X + +type UnresolvedAssemblyReference = UnresolvedAssemblyReference of string * AssemblyReference list + +#if !NO_EXTENSIONTYPING +type ResolvedExtensionReference = ResolvedExtensionReference of string * AssemblyReference list * Tainted list +#endif +""" + config + |> prepend newline + |> should + equal + """ +namespace X + +type UnresolvedAssemblyReference = UnresolvedAssemblyReference of string * AssemblyReference list + +#if !NO_EXTENSIONTYPING +type ResolvedExtensionReference = + | ResolvedExtensionReference of string * AssemblyReference list * Tainted list +#endif +"""