8000 erlfmt fails on ill-typed code that does map insertion or update · Issue #338 · WhatsApp/erlfmt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

erlfmt fails on ill-typed code that does map insertion or update #338

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

Closed
RobinMorisset opened this issue Jul 26, 2022 · 0 comments · Fixed by #339
Closed

erlfmt fails on ill-typed code that does map insertion or update #338

RobinMorisset opened this issue Jul 26, 2022 · 0 comments · Fixed by #339

Comments

@RobinMorisset
Copy link

On the following code:

-module(fmt4).

f()  ->
  2 # { 3 := 4 }.

erlfmt fails with the following error message: "formatter result invalid, could not reparse".
This code is ill-typed, but seems syntactically correct to me, and is accepted just fine by erlc.

The problem seems to be specifically when the left-side of a map update is a number, since replacing 2 by {0 => 1} is enough for erlfmt to format this code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant
0