-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
Cons pattern in let
bindings is converted to invalid code
#1996
Comments
Hello @clkbug, thank you for reporting this issue. @dsyme I believe this is a case where the let x::y = [0]
let op_ColonColon x y = [0] leads to LongIdent (LongIdentWithDots ([op_ColonColon], []), None, None, ... )
LongIdent (LongIdentWithDots ([op_ColonColon], []), None, None, ... ) So, inside the pattern node, having the original syntax would be beneficial. |
It'd likely be easier to work with |
This problem no longer seems to occur, doesn't it? |
No, the AST got updated and SynPat.ListCons got introduced to represent this. To close this issue properly, it would be great to include a regression test. That way, we can make sure that the changes made to the AST and the new If you're up for it, would you be interested in sending a PR (pull request)? It would be awesome to have your contribution to this fix! |
Issue created from fantomas-online
Code
Result
Problem description
After formatting, fantomas output the following error:
Extra information
Options
Fantomas 4.6 branch at 12/04/2021 18:09:39 - 9e35634
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: