Fix var and function declaration in eval (#4360)

Fixes #4149

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-12-14 11:30:45 +01:00
committed by GitHub
parent fe29bf7390
commit 29be24f056
5 changed files with 110 additions and 70 deletions
+1 -1
View File
@@ -1992,7 +1992,7 @@ parser_parse_source (const uint8_t *arg_list_p, /**< function argument list */
context.status_flags |= PARSER_LEXICAL_BLOCK_NEEDED;
}
if ((parse_opts & ECMA_PARSE_EVAL) == 0)
if (!(parse_opts & ECMA_PARSE_EVAL))
{
scanner_check_variables (&context);
}