File tree 3 files changed +42
-0
lines changed
3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
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
+
3
8
## 6.3.8 - 2024-06-06
4
9
5
10
### Fixed
11
+ * Fix loss of tuple type annotation without parens. [ #2942 ] ( https://github.com/fsprojects/fantomas/issues/2942 )
6
12
* Fix precedence change of ` ||> ` due to inserted newline. [ #2866 ] ( https://github.com/fsprojects/fantomas/issues/2866 )
7
13
8
14
## 6.3.7 - 2024-06-01
Original file line number Diff line number Diff line change @@ -202,3 +202,38 @@ type CreateBuildingViewModel =
202
202
203
203
then vm.program <- p
204
204
"""
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) =
1899
1899
| Expr.Lambda _ -> true
1900
1900
| Expr.InfixApp node ->
1901
1901
match node.RightHandSide with
1902
+ | Expr.Match _
1902
1903
| Expr.Lambda _ -> true
1903
1904
| _ -> false
1904
1905
| Expr.SameInfixApps node ->
You can’t perform that action at this time.
0 commit comments