You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@spec abc(Q.t(), R.t()) :: {:ok, X.Adapter.result()} | {:error, String.t()}
def abc(terminal, tx) do
{:error, {:a, :b}}
end
Unknown error occurred: %FunctionClauseError{module: Dialyxir.Warnings.InvalidContract, function: :format_long, arity: 1, kind: nil, args: nil, clauses: nil}
Legacy warning:
lib/x/adapters/y/payments.ex:52: Invalid type specification for function 'Elixir.X.Adapters.Y.Payments':abc/2.
The success typing is 'Elixir.X.Adapters.Y.Payments':abc(_,_) -> {'error',{'a','b'}}
But the spec is 'Elixir.X.Adapters.Y.Payments':abc('Elixir.X.Z.Q':t(),'Elixir.X.Z.R':t()) -> {'ok','Elixir.X.Adapter':result()} | {'error','Elixir.String':t()}
The return types do not overlap
This function was intentionally implemented as-is, to test/verify dialyzer/dialyxir works, because there is another function that violates the spec, but dialyzer/dialyxir doesn't catch it at all for some reason.