dialyxir icon indicating copy to clipboard operation
dialyxir copied to clipboard

Failed to parse warning: [{:"(", 1}, {:atom_part, 1, 'm'}...

Open lukaszsamson opened this issue 5 years ago • 1 comments

Environment

  • Elixir & Erlang/OTP versions (elixir --version): Erlang/OTP 22 [erts-10.6] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe] Elixir 1.9.4 (compiled with Erlang/OTP 22)
  • Which version of Dialyxir are you using? (cat mix.lock | grep dialyxir): master @ 62310a9cbcbb88a9ec08061d93946bf0f096bbbc

Current behavior

Failed to parse warning:
[{:"(", 1}, {:atom_part, 1, 'm'}, {:atom_part, 1, 'o'}, {:atom_part, 1, 'd'}, {:_, 1}, {:"fun(", 1}, {:")", 1}, {:",", 1}, {:atom_part, 1, 's'}, {:atom_part, 1, 'c'}, {:atom_part, 1, 'o'}, {:atom_part, 1, 'p'}, {:atom_part, 1, 'e'}, {:"::", 1}, {:atom_part, 1, 'a'}, {:atom_part, 1, 'n'}, {:atom_part, 1, 'y'}, {:"(", 1}, {:")", 1}, {:")", 1}, {:->, 1}, {:atom_part, 1, 'd'}, {:atom_part, 1, 'o'}, {:atom_part, 1, 'c'}, {:atom_part, 1, 's'}, {:"(", 1}, {:")", 1}]


Legacy warning:
lib/elixir_sense/core/introspection.ex:47: Type specification 'Elixir.ElixirSense.Core.Introspection':get_all_docs(mod_fun(),scope::any()) -> docs() is a subtype of the success typing: 'Elixir.ElixirSense.Core.Introspection':get_all_docs({atom(),_},_) -> #{'docs':=binary(), 'types':=binary(), 'callbacks'=>binary()}

lukaszsamson avatar Dec 28 '19 12:12 lukaszsamson

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

lukaszsamson avatar Dec 30 '19 09:12 lukaszsamson