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
When I duplicate a record ({ myRecord with FieldA = 5 }) and immediately access a member, the indentation after formatting is wrong. The interesting part is that this only happens if the . to access the member is in a new line, but it's fantomas which puts the . in the new line. So the compilation error only appears after formatting twice the same code (it took me a while to realize this when I tried to reproduce the problem):
Step 1:
match msg with| AMessage ->{ model with AFieldWithAVeryVeryVeryLooooooongName =10}.RecalculateTotal()
Step 2 (after Fantomas formatting):
match msg with| AMessage ->{ model with AFieldWithAVeryVeryVeryLooooooongName =10}
.RecalculateTotal()
Step 3 (after formatting again with Fantomas): compilation error
match msg with| AMessage ->{ model with AFieldWithAVeryVeryVeryLooooooongName =10}
.RecalculateTotal()
Code
typeMyRecord={ AFieldWithAVeryVeryVeryLooooooongName:int
FieldB:int
Total:int}memberthis.RecalculateTotal()={ this with Total = AFieldWithAVeryVeryVeryLooooooongName + FieldB }typeMsg=| AMessage
| AnotherMessage
letupdate msg model =letres=match msg with| AMessage ->{ model with AFieldWithAVeryVeryVeryLooooooongName =10}
.RecalculateTotal()| AnotherMessage -> model
res
Error
typeMyRecord={ AFieldWithAVeryVeryVeryLooooooongName :int
FieldB :int
Total :int }memberthis.RecalculateTotal()={ this with Total = AFieldWithAVeryVeryVeryLooooooongName + FieldB }typeMsg=| AMessage
| AnotherMessage
letupdate msg model =letres=match msg with| AMessage ->{ model with AFieldWithAVeryVeryVeryLooooooongName =10}
.RecalculateTotal()| AnotherMessage -> model
res
Options
Fantomas 2.9.1
Name
Value
IndentSpaceNum
4
PageWidth
80
PreserveEndOfLine
false
SemicolonAtEndOfLine
false
SpaceBeforeArgument
true
SpaceBeforeColon
true
SpaceAfterComma
true
SpaceAfterSemicolon
true
IndentOnTryWith
false
ReorderOpenDeclaration
false
SpaceAroundDelimiter
true
StrictMode
false
The text was updated successfully, but these errors were encountered:
nojaf
added a commit
to nojaf/fantomas
that referenced
this issue
Jan 17, 2019
Issue created from fantomas-ui
When I duplicate a record (
{ myRecord with FieldA = 5 }
) and immediately access a member, the indentation after formatting is wrong. The interesting part is that this only happens if the.
to access the member is in a new line, but it's fantomas which puts the.
in the new line. So the compilation error only appears after formatting twice the same code (it took me a while to realize this when I tried to reproduce the problem):Step 1:
Step 2 (after Fantomas formatting):
Step 3 (after formatting again with Fantomas): compilation error
Code
Error
Options
Fantomas 2.9.1
IndentSpaceNum
4
PageWidth
80
PreserveEndOfLine
false
SemicolonAtEndOfLine
false
SpaceBeforeArgument
true
SpaceBeforeColon
true
SpaceAfterComma
true
SpaceAfterSemicolon
true
IndentOnTryWith
false
ReorderOpenDeclaration
false
SpaceAroundDelimiter
true
StrictMode
false
The text was updated successfully, but these errors were encountered: