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
With listcomp parse transform, when compiling the following code:
[{Idx,I} || Idx, {req, FF} <- [{req, [10,20,30]}], I <- FF]
it produces the warning: Warning: variable 'FF' is unused.
Warning: variable 'FF' is unused
This is because the code gets transformed into:
element(1, lists:mapfoldl(fun ({_I@5_54 = {req, FF}, I}, Idx) -> {{Idx, I}, Idx + 1} end, 1, [{_I@5_54, I} || _I@5_54 = {req, FF} <- [{req, [10, 20, 30]}], I <- FF]))
where the FF variable in the lambda is unused in its body. The solution is to check the body of the lambda, and prefix all unused variables.
FF
The workaround is to prefix the unused variables with _:
_
[{Idx,I} || Idx, {req, _FF} <- [{req, [10,20,30]}], I <- _FF]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
With listcomp parse transform, when compiling the following code:
it produces the warning:
Warning: variable 'FF' is unused
.This is because the code gets transformed into:
where the
FF
variable in the lambda is unused in its body. The solution is to check the body of the lambda, and prefix all unused variables.The workaround is to prefix the unused variables with
_
:The text was updated successfully, but these errors were encountered: