File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed
Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 6.3.9 - 2024-06-10
4+
5+ ### Fixed
6+ * Invalid location of comma when using named parameters for a class. [ #2865 ] ( https://github.com/fsprojects/fantomas/issues/2865 )
7+
38## 6.3.8 - 2024-06-06
49
510### Fixed
11+ * Fix loss of tuple type annotation without parens. [ #2942 ] ( https://github.com/fsprojects/fantomas/issues/2942 )
612* Fix precedence change of ` ||> ` due to inserted newline. [ #2866 ] ( https://github.com/fsprojects/fantomas/issues/2866 )
713
814## 6.3.7 - 2024-06-01
Original file line number Diff line number Diff line change @@ -202,3 +202,38 @@ type CreateBuildingViewModel =
202202
203203 then vm.program <- p
204204"""
205+
206+ [<Test>]
207+ let ``invalid location of comma when using named parameters for a class , 2865`` () =
208+ formatSourceString
209+ """
210+ let instance =
211+ MyClass(
212+ Prop =
213+ match value.SomeValue with
214+ | Some _ -> 0.0m
215+ | None -> 0.0m
216+ ,
217+ Prop2 =
218+ match value.SomeValue with
219+ | Some _ -> 0.0m
220+ | None -> 0.0m
221+ )
222+ """
223+ config
224+ |> prepend newline
225+ |> should
226+ equal
227+ """
228+ let instance =
229+ MyClass(
230+ Prop =
231+ match value.SomeValue with
232+ | Some _ -> 0.0m
233+ | None -> 0.0m
234+ , Prop2 =
235+ match value.SomeValue with
236+ | Some _ -> 0.0m
237+ | None -> 0.0m
238+ )
239+ """
Original file line number Diff line number Diff line change @@ -1899,6 +1899,7 @@ let genTupleMultiline (node: ExprTupleNode) =
18991899 | Expr.Lambda _ -> true
19001900 | Expr.InfixApp node ->
19011901 match node.RightHandSide with
1902+ | Expr.Match _
19021903 | Expr.Lambda _ -> true
19031904 | _ -> false
19041905 | Expr.SameInfixApps node ->
You can’t perform that action at this time.
0 commit comments