We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://github.com/erlef/oidcc/actions/runs/7978117370/job/21787920914?pr=337
===> Compiling erlfmt _build/default/plugins/erlfmt/src/erlfmt_parse.yrl:98:71: Warning: expression updates a literal _build/default/plugins/erlfmt/src/erlfmt_parse.yrl:153:39: Warning: expression updates a literal _build/default/plugins/erlfmt/src/erlfmt_parse.yrl:155:39: Warning: expression updates a literal _build/default/plugins/erlfmt/src/erlfmt_parse.yrl:379:37: Warning: expression updates a literal _build/default/plugins/erlfmt/src/erlfmt_parse.yrl:382:37: Warning: expression updates a literal _build/default/plugins/erlfmt/src/erlfmt_parse.yrl:526:37: Warning: expression updates a literal _build/default/plugins/erlfmt/src/erlfmt_parse.yrl:529:37: Warning: expression updates a literal _build/default/plugins/erlfmt/src/erlfmt_parse.yrl:539:37: Warning: expression updates a literal _build/default/plugins/erlfmt/src/erlfmt_parse.yrl:542:37: Warning: expression updates a literal
erlfmt/src/erlfmt_parse.yrl
Line 98 in 732d443
It seems like the following is no longer allowed:
expr()#{property => value}
The code therefore will have to use maps:put/3 or maps:merge/2 instead.
maps:put/3
maps:merge/2
I'd be happy to provide a PR for that change.
The text was updated successfully, but these errors were encountered:
Yes, a PR would definitely be welcome. Either maps:put should work, alternative could be to try and redefine the macro as:
maps:put
-define(range_anno(Tok1, Tok2), begin #{ location => map_get(location, ?anno(Tok1)), end_location => map_get(end_location, ?anno(Tok2)) } end).
I wonder if this might be enough to "fool" the compiler into not emitting a warning
Sorry, something went wrong.
@michalmuskala Yes, the begin ... end trick works. 👍
begin ... end
Fix "expression updates a literal" warning for OTP 27 (#353)
d217674
Successfully merging a pull request may close this issue.
https://github.com/erlef/oidcc/actions/runs/7978117370/job/21787920914?pr=337
erlfmt/src/erlfmt_parse.yrl
Line 98 in 732d443
It seems like the following is no longer allowed:
expr()#{property => value}
The code therefore will have to use
maps:put/3
ormaps:merge/2
instead.I'd be happy to provide a PR for that change.
The text was updated successfully, but these errors were encountered: