message-format-wg icon indicating copy to clipboard operation
message-format-wg copied to clipboard

What is the behavior of `:number` when passed an option with a non-integer value?

Open catamorphism opened this issue 11 months ago • 1 comments

The spec for the :number function refers to five different options whose values must be a non-negative integer, beginning with minimumIntegerDigits and continuing from there.

However, it's unspecified what the behavior should be when something that can't be coerced to a non-negative integer is passed in for the value of one of these options. (I also assume that "non-negative integer" should include strings that can be parsed as non-negative integers; otherwise, literals as option values wouldn't work.)

If the implementation of the :number function should signal an error, that's a problem because of #738 (there is no error type that really fits this case).

If the error handling is meant to be implementation-dependent, then I think the registry spec should say that.

catamorphism avatar Mar 19 '24 19:03 catamorphism