-
-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fantomas introduces meaningless match
block
#1806
Comments
The parser does some desugaring for lambdas, and these nested matches are what the type checker is actually dealing with later. @nojaf I've added the originally parsed lambdas to the tree in dotnet/fsharp#10166 to workaround this problem in our plugin, you can try using it too. |
Yep, that is exactly what I'm using and has been really helpful. fantomas/src/Fantomas/SourceParser.fs Lines 1250 to 1269 in 3a12872
|
I might've added some incorrect range or expression in the PR, since I've found I had also added a workaround for getting the body, see |
Many thanks for the pointer there. I'll check if I can fix this in FCS sometime. |
Issue created from fantomas-online
Code
Result
Problem description
I honestly have not the faintest idea how this could have happened, but anyway, the additional
match
block is not meant to be there.Extra information
Options
Fantomas Master at 07/01/2021 18:56:12 - 3a12872
Default Fantomas configuration
Did you know that you can ignore files when formatting from fantomas-tool or the FAKE targets by using a .fantomasignore file?
The text was updated successfully, but these errors were encountered: