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
let``match bang`` ()=
formatSourceString false"""async { match! myAsyncFunction() with | Some x -> printfn "%A" x | None -> printfn "Function returned None!"}""" config
|> prepend newline
|> should equal """async { match! myAsyncFunction () with | Some x -> printfn "%A" x | None -> printfn "Function returned None!"}"""
Result
let``match bang`` ()=(formatSourceString false"""async { match! myAsyncFunction() with | Some x -> printfn "%A" x | None -> printfn "Function returned None!"}""" config)|> prepend newline
|> should equal """async { match! myAsyncFunction () with | Some x -> printfn "%A" x | None -> printfn "Function returned None!"}"""
The suggestion is to add newline if this case occurs:
let``match bang`` ()=
formatSourceString false"""async { match! myAsyncFunction() with | Some x -> printfn "%A" x | None -> printfn "Function returned None!"}"""
config
|> prepend newline
|> should equal """async { match! myAsyncFunction () with | Some x -> printfn "%A" x | None -> printfn "Function returned None!"}"""
Options
Fantomas Next - 4.0.0-alpha-001-1/1/1990
Name
Value
IndentSpaceNum
4
PageWidth
120
SemicolonAtEndOfLine
false
SpaceBeforeParameter
true
SpaceBeforeLowercaseInvocation
true
SpaceBeforeUppercaseInvocation
false
SpaceBeforeClassConstructor
false
SpaceBeforeMember
false
SpaceBeforeColon
false
SpaceAfterComma
true
SpaceBeforeSemicolon
false
SpaceAfterSemicolon
true
IndentOnTryWith
false
SpaceAroundDelimiter
true
MaxIfThenElseShortWidth
40
MaxInfixOperatorExpression
50
MaxRecordWidth
40
MaxArrayOrListWidth
40
MaxLetBindingWidth
40
MultilineBlockBracketsOnSameColumn
false
NewlineBetweenTypeDefinitionAndMembers
false
StrictMode
false
The text was updated successfully, but these errors were encountered:
nojaf
added a commit
to nojaf/fantomas
that referenced
this issue
Apr 24, 2020
Issue created from fantomas-online
Code
Result
This code doesn't compile anymore because the config parameter is considered to be part of the following infix expression. Regardless of the parameters.
See https://fsharp.org/specs/language-spec/4.1/FSharpSpec-4.1-latest.pdf#page=91&zoom=auto,-137,286
Page 91 last line.
The suggestion is to add newline if this case occurs:
Options
Fantomas Next - 4.0.0-alpha-001-1/1/1990
IndentSpaceNum
4
PageWidth
120
SemicolonAtEndOfLine
false
SpaceBeforeParameter
true
SpaceBeforeLowercaseInvocation
true
SpaceBeforeUppercaseInvocation
false
SpaceBeforeClassConstructor
false
SpaceBeforeMember
false
SpaceBeforeColon
false
SpaceAfterComma
true
SpaceBeforeSemicolon
false
SpaceAfterSemicolon
true
IndentOnTryWith
false
SpaceAroundDelimiter
true
MaxIfThenElseShortWidth
40
MaxInfixOperatorExpression
50
MaxRecordWidth
40
MaxArrayOrListWidth
40
MaxLetBindingWidth
40
MultilineBlockBracketsOnSameColumn
false
NewlineBetweenTypeDefinitionAndMembers
false
StrictMode
false
The text was updated successfully, but these errors were encountered: