Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error while running dialyxir #523

Open
epinault opened this issue Nov 8, 2023 · 0 comments
Open

error while running dialyxir #523

epinault opened this issue Nov 8, 2023 · 0 comments

Comments

@epinault
Copy link

epinault commented Nov 8, 2023

Precheck

Per #467 , opening a new issue., Will see if I can get a repro from private code

Environment

  • Elixir & Erlang/OTP versions (elixir --version): elixir 1.15, OTP 26

  • Which version of Dialyxir are you using? (cat mix.lock | grep dialyxir): 1.4.2

Current behavior

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

Expected behavior

  • A short description of the expected behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant