Skip to content
This repository has been archived by the owner on Sep 16, 2020. It is now read-only.

Fix unsafe variables #36

Open
mspanc opened this issue Jan 5, 2017 · 0 comments
Open

Fix unsafe variables #36

mspanc opened this issue Jan 5, 2017 · 0 comments

Comments

@mspanc
Copy link
Contributor

mspanc commented Jan 5, 2017

When I am using toniq 1.2.0 with elixir 1.3.4, the following warning appears during compilation:

remote: warning: the variable "v1" is unsafe as it has been set inside a case/cond/receive/if/&&/||. Please explicitly return the variable value instead. For example:
remote:
remote:     case int do
remote:       1 -> atom = :one
remote:       2 -> atom = :two
remote:     end
remote:
remote: should be written as
remote:
remote:     atom =
remote:       case int do
remote:         1 -> :one
remote:         2 -> :two
remote:       end
remote:
remote: Unsafe variable found at:
remote:   lib/toniq/job.ex:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant