Rework flags representing arrow functions and complex arguments (#3957)

This allows detecting cases which was not possible before.

Fixes #3944

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-06-30 14:00:35 +02:00
committed by GitHub
parent 122480aa61
commit cd949d9d64
9 changed files with 65 additions and 36 deletions
+1 -1
View File
@@ -2773,7 +2773,7 @@ parser_parse_statements (parser_context_t *context_p) /**< context */
#if ENABLED (JERRY_ESNEXT)
if (strict_mode != PARSER_USE_STRICT_NOT_FOUND
&& (context_p->status_flags & PARSER_FUNCTION_HAS_NON_SIMPLE_PARAM))
&& (context_p->status_flags & PARSER_FUNCTION_HAS_COMPLEX_ARGUMENT))
{
parser_raise_error (context_p, PARSER_ERR_USE_STRICT_NOT_ALLOWED);
}