diff --git a/lib/dialyxir/warnings/invalid_contract.ex b/lib/dialyxir/warnings/invalid_contract.ex index 2f86a51..95cb0f6 100644 --- a/lib/dialyxir/warnings/invalid_contract.ex +++ b/lib/dialyxir/warnings/invalid_contract.ex @@ -31,7 +31,11 @@ defmodule Dialyxir.Warnings.InvalidContract do @impl Dialyxir.Warning @spec format_long([String.t()]) :: String.t() - def format_long([module, function, arity, _args, signature | _]) do + def format_long([module, function, arity, signature]) do + format_long([module, function, arity, nil, signature]) + end + + def format_long([module, function, arity, _args, signature]) do pretty_module = Erlex.pretty_print(module) pretty_signature = Erlex.pretty_print_contract(signature)