Forbidden extension in RegExp pattern grammar #4368
See https://tc39.github.io/ecma262/#sec-forbidden-extensions (and https://bugs.ecmascript.org/show_bug.cgi?id=3157 for more background):
Chakra incorrectly extends the grammar in this way, which is especially problematic for
This presents a compatibility risk. One might reasonably assume that if the above RegExp compiles without throwing an exception, the engine supports Unicode property escapes, and then rely on the results that it produces. With the current behavior, that would result in incorrect results.
Any of the following should throw an exception:
/\p/u; /\P/u; /\a/u; /\A/u; /\e/u; /\E/u; /\y/u; /\Y/u; /\z/u; /\Z/u;
And this should throw an exception until Unicode property escapes are implemented:
The text was updated successfully, but these errors were encountered: