Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Timber.add_context wrong typespec #348

Open
gabrielpra1 opened this issue Jun 10, 2019 · 0 comments · May be fixed by #352
Open

Timber.add_context wrong typespec #348

gabrielpra1 opened this issue Jun 10, 2019 · 0 comments · May be fixed by #352

Comments

@gabrielpra1
Copy link

Timber.add_context has the typespec @spec add_context(map()) :: :ok, even though the function also accepts a keyword list as parameter.

This causes Dialyzer to throw misleading warnings:

The call 'Elixir.Timber':add_context([{'origin','tracker'},...]) will never return since the success typing is (map()) -> 'ok' and the contract is (map()) -> 'ok'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant