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

The type in the @spec does not completely cover the types returned by function.

Example

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

  def ok(:error) do
    :error
  end
end