Accessor functions do not have [[Construct]] internal method (#3698)

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
This commit is contained in:
Szilagyi Adam
2020-04-29 13:04:57 +02:00
committed by GitHub
parent 62730f2ae1
commit 2bdd0f5008
4 changed files with 44 additions and 2 deletions
+5
View File
@@ -1305,6 +1305,11 @@ parser_post_processing (parser_context_t *context_p) /**< context */
}
#if ENABLED (JERRY_ES2015)
if (context_p->status_flags & (PARSER_IS_PROPERTY_GETTER | PARSER_IS_PROPERTY_SETTER))
{
compiled_code_p->status_flags |= CBC_CODE_FLAGS_ACCESSOR;
}
if (context_p->status_flags & PARSER_IS_ARROW_FUNCTION)
{
compiled_code_p->status_flags |= CBC_CODE_FLAGS_ARROW_FUNCTION;