test262 icon indicating copy to clipboard operation
test262 copied to clipboard

test/staging/sm/TypedArray/toLocaleString-detached.js assumes implementation-defined separator

Open linusg opened this issue 1 month ago • 0 comments

From https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring:

This is a distinct method that implements the same algorithm as Array.prototype.toLocaleString as defined in 23.1.3.32 except that TypedArrayLength is called in place of performing a [[Get]] of "length".

From https://tc39.es/ecma262/#sec-array.prototype.tolocalestring:

  1. Let separator be the implementation-defined list-separator String value appropriate for the host environment's current locale (such as ", ").

This test assumes the implementation-defined separator is , without a space:

https://github.com/tc39/test262/blob/c125a8dc610bb0f03366d342dc2f1f41712f0caa/test/staging/sm/TypedArray/toLocaleString-detached.js#L40

This is not true in at least Boa and Kiesel which both use , .

linusg avatar Nov 19 '25 00:11 linusg