diff --git a/jerry-core/ecma/operations/ecma-function-object.c b/jerry-core/ecma/operations/ecma-function-object.c index b9bf27f62..678bb7e48 100644 --- a/jerry-core/ecma/operations/ecma-function-object.c +++ b/jerry-core/ecma/operations/ecma-function-object.c @@ -1530,10 +1530,11 @@ ecma_op_function_try_to_lazy_instantiate_property (ecma_object_t *object_p, /**< bytecode_data_p = ecma_op_function_get_compiled_code ((ecma_extended_object_t *) object_p); #if ENABLED (JERRY_ESNEXT) - if (!(bytecode_data_p->status_flags & CBC_CODE_FLAGS_STRICT_MODE)) + if (!(bytecode_data_p->status_flags & CBC_CODE_FLAGS_STRICT_MODE) + && !(CBC_FUNCTION_GET_TYPE (bytecode_data_p->status_flags) == CBC_FUNCTION_ARROW)) { ecma_property_t *value_prop_p; - /* The property_name_p argument contans the name. */ + /* The property_name_p argument contains the name. */ ecma_property_value_t *value_p = ecma_create_named_data_property (object_p, property_name_p, ECMA_PROPERTY_FIXED, @@ -1547,7 +1548,7 @@ ecma_op_function_try_to_lazy_instantiate_property (ecma_object_t *object_p, /**< ecma_object_t *thrower_p = ecma_builtin_get (ECMA_BUILTIN_ID_TYPE_ERROR_THROWER); ecma_property_t *caller_prop_p; - /* The property_name_p argument contans the name. */ + /* The property_name_p argument contains the name. */ ecma_create_named_accessor_property (object_p, property_name_p, thrower_p, diff --git a/tests/jerry/es.next/arrow-function.js b/tests/jerry/es.next/arrow-function.js index 0b9b8f683..0d11ec439 100644 --- a/tests/jerry/es.next/arrow-function.js +++ b/tests/jerry/es.next/arrow-function.js @@ -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") diff --git a/tests/test262-es6-excludelist.xml b/tests/test262-es6-excludelist.xml index c95bc7974..37900bac3 100644 --- a/tests/test262-es6-excludelist.xml +++ b/tests/test262-es6-excludelist.xml @@ -330,7 +330,6 @@ -