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

request!/1 invalid spec #482

Closed
wants to merge 1 commit into from

Conversation

mjquinlan2000
Copy link

I upgraded to version 2.2.0 and started getting the following dialyzer error:

lib/dialyzer_test/client.ex:2: Invalid type specification for function 'Elixir.DialyzerTest.Client':'request!'/1.
 The success typing is 'Elixir.DialyzerTest.Client':'request!'(#{'__struct__':='Elixir.HTTPoison.Request', 'body':=_, 'headers':=_, 'method':='delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put', 'options':=_, 'params':=_, 'url':=binary()}) -> #{'__struct__':='Elixir.HTTPoison.AsyncResponse' | 'Elixir.HTTPoison.MaybeRedirect' | 'Elixir.HTTPoison.Response', 'body'=>_, 'headers'=>[any()], 'id'=>reference(), 'redirect_url'=>_, 'request'=>#{'__struct__':='Elixir.HTTPoison.Request', 'body':=_, 'headers':=_, 'method':='delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put', 'options':=_, 'params':=_, 'url':=binary()}, 'request_url'=>_, 'status_code'=>integer()}
 But the spec is 'Elixir.DialyzerTest.Client':'request!'('Elixir.HTTPoison.Request':t()) -> {'ok','Elixir.HTTPoison.Response':t() | 'Elixir.HTTPoison.AsyncResponse':t() | 'Elixir.HTTPoison.MaybeRedirect':t()}
 The return types do not overlap

This seems to fix it

@mjquinlan2000
Copy link
Author

Didn't see #481

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

Successfully merging this pull request may close these issues.

None yet

1 participant