In ES5, grammar of CharacterRange was ambiguous, resulting in invalid ranges like /[\d-a]/ being allowed. As of ES2015, invalid ranges are SyntaxError in unicode patterns, yet still allowed in regular ones to avoid breaking the web. Test case: /[a-\d]/u Expected: SyntaxError thrown Actual: RegExp instance ECMA262: https://tc39.es/ecma262/#sec-patterns-static-semantics-early-errors-annexb Test262: https://test262.report/browse/built-ins/RegExp/unicode_restricted_character_class_escape.js test/built-ins/RegExp/property-escapes/character-class-range*.js test/language/literals/regexp/u-invalid-non-empty-class-ranges*.js
Created attachment 388721 [details] Patch
Comment on attachment 388721 [details] Patch Seems like we keep saying “unicode” in error messages but it should be “Unicode”. It’s a propert noun not a common one.
The commit-queue encountered the following flaky tests while processing attachment 388721 [details]: editing/spelling/spellcheck-attribute.html bug 206178 (authors: g.czajkowski@samsung.com, mark.lam@apple.com, and rniwa@webkit.org) The commit-queue is continuing to process your patch.
Comment on attachment 388721 [details] Patch Clearing flags on attachment: 388721 Committed r255134: <https://trac.webkit.org/changeset/255134>
All reviewed patches have been landed. Closing bug.
<rdar://problem/58905705>