jeremyjh / dialyxir

Mix tasks to simplify use of Dialyzer in Elixir projects.
Apache License 2.0
1.7k stars 140 forks source link

parser fails to parse type with error-tuple and binary. #122

Closed NobbZ closed 6 years ago

NobbZ commented 6 years ago
________________________________________________________________________________
Please file a bug with this message.

Failed to parse part of warning:
{:warn_matching, {'lib/eaten_web/controllers/session_controller.ex', 6}, {:pattern_match, ['pattern {\'ok\', Vuser@1}', '{\'error\',<<_:64,_:_*8>>}']}}

Failing part:
{'error',<<_:64,_:_*8>>}

Legacy warning:
lib/eaten_web/controllers/session_controller.ex:6: The pattern {'ok', Vuser@1} can never match the type {'error',<<_:64,_:_*8>>}
________________________________________________________________________________
asummers commented 6 years ago

The instructions in the code aren't at all clear, but we're collecting these in the PR thread. I'm going to close this and cross post in there (for my own sanity 😀), fix the instructions to direct people there, and ping you when this is fixed. Thank you for the report 😄 ♥️

NobbZ commented 6 years ago

I forgot to add version info:

$ cat mix.lock | grep dial
  "dialyxir": {:git, "https://github.com/jeremyjh/dialyxir", "9b686114ec56bd422111b16ab9a1a602c224913e", [branch: "elixir-formatter"]},
$ elixir --version
Erlang/OTP 20 [erts-9.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false]

Elixir 1.6.4 (compiled with OTP 20)
$ uname -a
Linux arch-tuxedo 4.16.3-1-ARCH #1 SMP PREEMPT Thu Apr 19 09:17:56 UTC 2018 x86_64 GNU/Linux
asummers commented 6 years ago

@NobbZ Mind posting the @spec for that function in the PR? Particularly the part for the error tuple. Thank you very much! 😃