Environment
- Elixir & Erlang/OTP versions (elixir --version): 1.10.3 / OTP 22
- Operating system: Linux Mint
Current behavior
A private function taking n arguments, say 5 with the last two set to default values, when compiled without another function in the module ever invoking it with less than 4 arguments, gives a misleading warning message:
warning: the first 4 default arguments in foo/5 are never used
ex:
defp foo( arg1, arg2, arg3, arg4 \\ nil, arg5 \\ nil) do
..
end
Expected behavior
The warning message should read something like:
warning: the default value for argument no. 4 in foo/5 is never used