diff --git a/jerry-core/parser/js/parser.cpp b/jerry-core/parser/js/parser.cpp index fe056d59cc..455cf50aac 100644 --- a/jerry-core/parser/js/parser.cpp +++ b/jerry-core/parser/js/parser.cpp @@ -267,7 +267,7 @@ parse_property_assignment (void) syntax_add_prop_name (name, is_setter ? PROP_SET : PROP_GET); skip_newlines (); - const operand func = parse_argument_list (VARG_FUNC_EXPR, name, NULL, NULL); + const operand func = parse_argument_list (VARG_FUNC_EXPR, empty_operand (), NULL, NULL); dump_function_end_for_rewrite (); diff --git a/tests/jerry/object-literal.js b/tests/jerry/object-literal.js index 4fc06ccf78..696556399c 100644 --- a/tests/jerry/object-literal.js +++ b/tests/jerry/object-literal.js @@ -71,3 +71,22 @@ assert (a.property1 === 25); b = delete a[b]; assert (b === true); assert (a.property1 === undefined); + +flow = ''; +a = { + get q () + { + flow += 'get: ' + (typeof q); + + return 0; + }, + set q (v) + { + flow += ', set: ' + (typeof q); + } +}; + +a.q; +a.q = 1; + +assert (flow == 'get: undefined, set: undefined');