Dialyxir.Warnings.InvalidContract (Dialyxir v1.4.4) View Source

The @spec for the function does not match the success typing of the function.

Example

defmodule Example do
  @spec process(:error) :: :ok
  def process(:ok) do
    :ok
  end
end

The @spec in this case claims that the function accepts a parameter :error but the function head only accepts :ok, resulting in the mismatch.