The function has an additional @spec that is already covered more generally by a higher @spec.
defmodule Example do @spec ok(atom) :: :ok def ok(:ok) do :ok end @spec ok(:error) :: :ok def ok(:error) do :ok end end