Dialyxir.Warnings.CallbackSpecTypeMismatch (Dialyxir v1.4.2) View Source

The return type in the @spec does not match the expected return type of the behaviour.

Example

defmodule ExampleBehaviour do
  @callback ok(:ok) :: :ok
end

defmodule Example do
  @behaviour ExampleBehaviour

  @spec ok(:ok) :: :error
  def ok(:ok) do
    :error
  end
end