Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Editorial: Remove ToNumber's note re surrogates (#1554)
The note says that "the result of ToNumber will be *NaN* if the string contains any [surrogate] code units, whether paired or unpaired." However, if Unicode were to define a non-BMP code point with General_Category=Zs, that would qualify as <USP> and thus WhiteSpace and StrWhiteSpaceChar, in which case the note would be rendered false. That is, the ToNumber procedure would continue to work, and would result in non-NaN values for some strings containing surrogates. (And if you think that the ES spec doesn't need to concern itself with such future possibilities, note that ES 6 (2015) changed/clarified the semantics of String.p.trim et al for precisely this case, to say how they would deal with non-BMP white space.) Given that the note could be invalidated by a future edition of Unicode, I think it's a bit risky to keep it in.
- Loading branch information