Pluralisation fails for infinite values #701
Labels
bug
an unexpected problem or unintended behavior
tidy-dev-day 🤓
Tidyverse Developer Day rstd.io/tidy-dev-day
If the number used for pluralisation is
Inf
, message creation fails.The issue I think starts here, where the number is coerced to an integer.
as.integer(Inf)
is NA. Then hereprocess_plural()
runsif (length(parts) == 1)
, which isNA
.I'm not sure there's a standard way of pluralising infinite value, so the solution might be to catch the issue early and throw a better error instead of implementing plurals for
Inf
.The text was updated successfully, but these errors were encountered: