1) There was this for simple :fun error case (the problem is presence of a guard):
defp validate_type(:fun, key, value) when is_function(value) do
error_tuple(key, value, "expected function in #{render_key(key)}, got: #{inspect(value)}")
end
2) Validate case for {:fun, args} was after {:fun, arity} and neither was checking for a type of the second element.
Two things:
1) There was this for simple
:fun
error case (the problem is presence of a guard):2) Validate case for
{:fun, args}
was after{:fun, arity}
and neither was checking for a type of the second element.