Dialyxir.Warnings.ContractWithOpaque (Dialyxir v1.4.4) View Source

The @spec says the function is returning an opaque type, but it is returning a different type.

Example

defmodule Types do
  @opaque type :: :ok
end

defmodule Example do
  @spec ok() :: Types.type()
  def ok() do
    :ok
  end
end