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
The following code causes the compiler to emit a warning:
assert_receive {:ok, num} # line 10 assert ^num = 13 # line 11
test/exunit_export_test.exs:11: warning: variable num@1 exported from 'receive' (line 10)
Example repo with 2 tags: warning and no-warning – https://github.com/alco/ex_unit-warning-exported-var
warning
no-warning
The text was updated successfully, but these errors were encountered:
Interesting, I am running the latest code on master branch and didn't receive any warning when running mix test on your linked mix project.
mix test
Sorry, something went wrong.
@jw2013 you need to check out the warning tag.
@alco Ah, thanks so much for the clarification.
Is there any particular reason we don't use this instead:
num = 13 # line 10 assert_receive {:ok, ^num} # line 11
It happens beyond assert_receive example with every macro + export_head before ^, e.g:
assert_receive
macro + export_head
^
destructure([x], [3]) ^x = 3
and comes from erl_lint.erl.
erl_lint.erl
20bf4b0
Ignore exported vars warning
750d2a3
Closes #2798 Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
No branches or pull requests
The following code causes the compiler to emit a warning:
Example repo with 2 tags:
warning
andno-warning
– https://github.com/alco/ex_unit-warning-exported-varThe text was updated successfully, but these errors were encountered: