With both Erlang 21.2.6 / Elixir 1.7.4-otp-21 and Erlang 23.2 / Elixir 1.11.4:
warning: variable "rules" does not exist and is being expanded to "rules()", please use parentheses to remove the ambiguity or change the variable name
lib/exiban/validators.ex:56: ExIban.Validators.check_country_code/1
warning: variable "rules" does not exist and is being expanded to "rules()", please use parentheses to remove the ambiguity or change the variable name
lib/exiban/validators.ex:65: ExIban.Validators.check_length/1
warning: variable "rules" does not exist and is being expanded to "rules()", please use parentheses to remove the ambiguity or change the variable name
lib/exiban/validators.ex:73: ExIban.Validators.check_format/1
That rules should probably be ExIban.Rules.rules/0 .
For some reasons the import ExiIban.Rules at the top of the file doesn't work. This patch fixes the problem:
With both Erlang 21.2.6 / Elixir 1.7.4-otp-21 and Erlang 23.2 / Elixir 1.11.4:
That
rules
should probably beExIban.Rules.rules/0
.For some reasons the
import ExiIban.Rules
at the top of the file doesn't work. This patch fixes the problem:I didn't try the code with older versions of Erlang and Elixir.
All tests pass both with and without the fix. That's strange.