You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typeMyCSharpClass()=member valProp=0.0m with get, set
member valProp2=0.0m with get, set
typeFSharpType={
SomeValue:string option}letv={ SomeValue = Some "str"}letinstance=
MyClass(
Prop =match value.SomeValue with| Some _->0.0m
| None ->0.0m
,
Prop2 =match value.SomeValue with| Some _->0.0m
| None ->0.0m
)
Result
typeMyCSharpClass()=member valProp=0.0m with get, set
member valProp2=0.0m with get, set
typeFSharpType={ SomeValue:string option }letv={ SomeValue = Some "str"}letinstance=
MyClass(
Prop =match value.SomeValue with| Some _->0.0m
| None ->0.0m,
Prop2 =match value.SomeValue with| Some _->0.0m
| None ->0.0m
)
Problem description
It seems that when we have multiple match statements passed to named parameters for a class it places the , in the wrong place. That results in a dotnet fantomas error.
Known workarounds are:
surround the match statement with (),
letinstance=
MyClass((Prop =match value.SomeValue with| Some _->0.0m
| None ->0.0m),(Prop2 =match value.SomeValue with| Some _->0.0m
| None ->0.0m))
extract the match statement to an explicit variable.
Issue created from fantomas-online
Code
Result
Problem description
It seems that when we have multiple match statements passed to named parameters for a class it places the
,
in the wrong place. That results in adotnet fantomas
error.Known workarounds are:
()
,Extra information
Options
Fantomas main branch at 2023-04-20T16:04:28Z - 4ed1e9d
Default Fantomas configuration
The text was updated successfully, but these errors were encountered: