diff --git a/src/Fantomas.Tests/SignatureTests.fs b/src/Fantomas.Tests/SignatureTests.fs index 40491bb2b3..b9c214c3ac 100644 --- a/src/Fantomas.Tests/SignatureTests.fs +++ b/src/Fantomas.Tests/SignatureTests.fs @@ -1601,3 +1601,22 @@ type Foo = Qux: string } static member Baz: int """ + +[] +let ``mod name in val, 1960`` () = + formatSourceString + true + """ +module X + +val ``mod``: t -> t -> t +""" + config + |> prepend newline + |> should + equal + """ +module X + +val ``mod``: t -> t -> t +""" diff --git a/src/Fantomas/SourceParser.fs b/src/Fantomas/SourceParser.fs index 6ec91d0e0e..a70ad751eb 100644 --- a/src/Fantomas/SourceParser.fs +++ b/src/Fantomas/SourceParser.fs @@ -35,6 +35,7 @@ let (|Ident|) (s: Ident) = | "not" -> "not" | "params" -> "``params``" | "parallel" -> "``parallel``" + | "mod" -> "``mod``" | _ -> if IsActivePatternName ident then sprintf "(%s)" (DecompileOpName ident)