elixir-cldr / cldr

Elixir implementation of CLDR/ICU

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typespec of do_plural_rule might not match success typing when using extra_returns

Munksgaard opened this issue · comments

Similar to elixir-cldr/cldr_numbers#44 and elixir-cldr/cldr_currencies#11, Cldr can cause issues for projects that have the extra_returns option for dialyzer enabled.

The issue (as I understand it) is that the return type of do_plural_rule depends on the specific locale used. Therefore, we cannot statically determine the correct typespec. At the same, accurately describing the possible values that might be returned is valuable, so we would like to keep the typespec in place. Therefore, a solution might be to silence warnings for this particular function.