Closed smt116 closed 10 months ago
same for OTP26 and 1.15
Please file a bug in https://github.com/jeremyjh/dialyxir/issues with this message.
Unknown error occurred: %FunctionClauseError{module: Dialyxir.Warnings.InvalidContract, function: :format_long, arity: 1, kind: nil, args: nil, clauses: nil}
Legacy warning:
lib/halberd_client/http_client.ex:10: Invalid type specification for function 'Elixir.HalberdClient.HTTPClient':get/2.
The success typing is 'Elixir.HalberdClient.HTTPClient':get(binary(),'nil' | maybe_improper_list() | map()) -> {'error',_} | {'ok',#{'__client__':=#{'__struct__':='Elixir.Tesla.Client', 'adapter':='nil' | {_,_} | {_,_,_}, 'fun':=_, 'post':=[any()], 'pre':=[any()]}, '__module__':=atom(), '__struct__':='Elixir.Tesla.Env', 'body':=_, 'headers':=[{_,_}], 'method':='delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace', 'opts':=[{_,_}], 'query':=[{_,_}], 'status':='nil' | integer(), 'url':=binary()}}
But the spec is 'Elixir.HalberdClient.HTTPClient':get('Elixir.Tesla.Env':url(),'Elixir.Tesla':option()) -> 'Elixir.Tesla.Env':result()
They do not overlap in the 2nd argument
@jeremyjh , any idea?
@epinault that's a completely different error, please open a new issue and include a link to a repo that I could reproduce it with if possible.
unfortunately code is private code . Would need to figure out how I can abstract code and repo that situation then. I ll opena. new issue and see if I can provide a repro case
Environment
Elixir & Erlang/OTP versions (elixir --version): Elixir 1.13.4 (compiled with Erlang/OTP 23)
Which version of Dialyxir are you using? (cat mix.lock | grep dialyxir): 1.2.0
Current behavior