Remove arguments and caller properties from ArrowFunction (#3906)
As stated in ES11 16.1, ArrowFunction should not have caller and arguments properties. JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna r.walczyna@samsung.com
This commit is contained in:
@@ -184,3 +184,13 @@ assert(f()()() === 7);
|
||||
|
||||
var f = (((a=1,b=2) => ((x => (((a) => 8))))));
|
||||
assert(f()()() === 8);
|
||||
|
||||
var f = () => {};
|
||||
|
||||
assert(f.hasOwnProperty('caller') === false);
|
||||
assert(f.hasOwnProperty('arguments') === false);
|
||||
|
||||
must_throw("var f = () => {}; f.caller")
|
||||
must_throw("var f = () => {}; f.arguments")
|
||||
must_throw("var f = () => {}; f.caller = 1")
|
||||
must_throw("var f = () => {}; f.arguments = 2")
|
||||
|
||||
@@ -330,7 +330,6 @@
|
||||
<test id="language/computed-property-names/object/accessor/setter-super.js"><reason></reason></test>
|
||||
<test id="language/computed-property-names/object/method/super.js"><reason></reason></test>
|
||||
<test id="language/default-parameters/function-length.js"><reason></reason></test>
|
||||
<test id="language/expressions/arrow-function/ArrowFunction_restricted-properties.js"><reason></reason></test>
|
||||
<test id="language/expressions/arrow-function/lexical-super-call-from-within-constructor.js"><reason></reason></test>
|
||||
<test id="language/expressions/assignment/destructuring/array-rest-init.js"><reason></reason></test>
|
||||
<test id="language/expressions/assignment/destructuring/obj-prop-elem-target-yield-expr.js"><reason></reason></test>
|
||||
|
||||
Reference in New Issue
Block a user