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

The pattern match has a later clause that will never be executed, because a more general clause is higher in the matching order.

Example

defmodule Example do
  def ok() do
    unmatched(:error)
  end

  defp unmatched(_), do: :ok

  defp unmatched(:error), do: :error
end