You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix dialyzer invalid contract in token_pairs.ex (#646)
From dialyzer warning:
```
lib/language_server/providers/folding_range/token_pairs.ex:50:invalid_contract
The @SPEC for the function does not match the success typing of the function.
Function:
ElixirLS.LanguageServer.Providers.FoldingRange.TokenPair.provide_ranges/1
Success typing:
@SPEC provide_ranges(%{:tokens => [{atom(), {_, _, _}, _}], _ => _}) ::
{:ok,
[
%{
:endLine => non_neg_integer(),
:startLine => non_neg_integer(),
:endCharacter? => non_neg_integer(),
:kind? => :comment | :imports | :region,
:startCharacter? => non_neg_integer()
}
]}
```
It's happens because the typespec function declare that it accepts the
list of folding range, but in the real usage, it accepts just one
folding range.
0 commit comments