Closed sunlili closed 4 years ago
Hello, The following code behaves incorrectly (inconsistent with other engines).
RegExp.prototype.__defineGetter__("global", () => true); print("BT_FLAG");
In ChakraCore, the output is TypeError: Cannot redefine non-configurable property 'global'
TypeError: Cannot redefine non-configurable property 'global'
However, in V8 , SpiderMonkey and JSC, output is BT_FLAG
BT_FLAG
BT group 2018.7.24
This is because we have not yet enabled the ES6 regex prototype properties by default. If you run with -ES6RegexPrototypeProperties then it behaves as expected.
-ES6RegexPrototypeProperties
Consolidating as part of #6390
Hello, The following code behaves incorrectly (inconsistent with other engines).
In ChakraCore, the output is
TypeError: Cannot redefine non-configurable property 'global'
However, in V8 , SpiderMonkey and JSC, output is
BT_FLAG
BT group 2018.7.24