Skip to content

Commit

Permalink
Silence dialyzer warning that comes from OTP bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kipcole9 committed Feb 2, 2020
1 parent 74211aa commit eb654f0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .dialyzer_ignore_warnings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
:0: Unknown function persistent_term:get/2
:0: Unknown function persistent_term:put/2
4 changes: 2 additions & 2 deletions lib/cldr/backend/relative.ex
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ defmodule Cldr.DateTime.Relative.Backend do
"""

@spec to_string(integer | float | Date.t() | DateTime.t(), Keyword.t()) ::
@spec to_string(number | map(), Keyword.t()) ::
{:ok, String.t()} | {:error, {module, String.t()}}

def to_string(time, options \\ []) do
Expand Down Expand Up @@ -164,7 +164,7 @@ defmodule Cldr.DateTime.Relative.Backend do
See `to_string/2`
"""
@spec to_string!(number, Keyword.t()) :: String.t()
@spec to_string!(number | map(), Keyword.t()) :: String.t()
def to_string!(time, options \\ []) do
Cldr.DateTime.Relative.to_string!(time, unquote(backend), options)
end
Expand Down
5 changes: 4 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ defmodule CldrDatesTimes.Mixfile do
start_permanent: Mix.env() == :prod,
deps: deps(),
compilers: Mix.compilers(),
elixirc_paths: elixirc_paths(Mix.env())
elixirc_paths: elixirc_paths(Mix.env()),
dialyzer: [
ignore_warnings: ".dialyzer_ignore_warnings"
]
]
end

Expand Down

0 comments on commit eb654f0

Please sign in to comment.