# `Dialyxir.Warnings.InvalidContract`
[🔗](https://github.com/jeremyjh/dialyxir/blob/1.4.8/lib/dialyxir/warnings/invalid_contract.ex#L1)

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.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
