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

Legacy warning #466

Closed
saleynik opened this issue Aug 18, 2022 · 0 comments · Fixed by #526
Closed

Legacy warning #466

saleynik opened this issue Aug 18, 2022 · 0 comments · Fixed by #526

Comments

@saleynik
Copy link

Environment

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

Erlang/OTP 25
Elixir 1.13.2

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

1.2.0

Current behavior

mix dialyzer reports:

Please file a bug in https://github.com/jeremyjh/dialyxir/issues with this message.

Unknown error occurred: %Protocol.UndefinedError{description: "", protocol: String.Chars, value: {74, 30}}

Legacy warning:
src/fx.erl:74:30: Unknown type util:success_decode/0

Line fx.erl:74:

-spec decode(nif|native, binary(), nif:decode_options()) ->
        {ok, Rest::binary(), util:success_decode()}
        | {more, non_neg_integer()}
        | {error, any()}
        | no_return().

util.erl is accessible to dialyzer, and has this:

-type success_decode() ::
  {MatchedFldCount::integer(), Header::map(),
    {MsgType::atom(),Msg::map()}, UnparsedFields::list()}.

Expected behavior

Dialyzer should not produce no warning. Also note that when the same project is analyzed with rebar3 dialyzer there are no warnings produced.

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 a pull request may close this issue.

1 participant