jeremyjh / dialyxir

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

Failed to format warning: @spec a:none | ... #378

Closed lukaszsamson closed 4 years ago

lukaszsamson commented 4 years ago

Environment

Legacy warning: lib/elixir_sense/providers/signature.ex:18: The success typing for 'Elixir.ElixirSense.Providers.Signature':find/3 implies that the function might also return #{'active_param':=non_neg_integer(), 'pipe_before':=boolean(), 'signatures':=maybe_improper_list()} but the specification return is 'none' | #{'active_param':=pos_integer(), 'signatures':=[#{'name':=binary(), 'params':=[binary()]}]}

asummers commented 4 years ago

You have code in the wild that does that? Awesome! Would you mind giving me an example so I can improve the docs?

lukaszsamson commented 4 years ago

@asummers to reproduce

  1. clone https://github.com/elixir-lsp/elixir_sense
  2. in mix.exs add :overspecs dialyzer flag
  3. (optional ) bump dialyxir to github master
  4. mix deps.get && mix dialyzer