Skip to content

Fix incorrect assertion in parser_parse_for_statement_start#3795

Merged
dbatyai merged 1 commit intojerryscript-project:masterfrom
rerobika:fix_issue_3751
May 26, 2020
Merged

Fix incorrect assertion in parser_parse_for_statement_start#3795
dbatyai merged 1 commit intojerryscript-project:masterfrom
rerobika:fix_issue_3751

Conversation

@rerobika
Copy link
Copy Markdown
Member

This patch fixes #3751.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu

@dbatyai dbatyai added the bug Undesired behaviour label May 25, 2020
Comment thread jerry-core/parser/js/js-parser-statm.c Outdated
if (literal_index >= PARSER_REGISTER_START && has_context)
if (!(literal_index >= PARSER_REGISTER_START
|| !has_context
|| scanner_literal_is_created (context_p, literal_index)))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please simplify this condition by merging the outer negation.

This patch fixes jerryscript-project#3751.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
Copy link
Copy Markdown
Member

@zherczeg zherczeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Assert fixes are so funny.

Copy link
Copy Markdown
Member

@dbatyai dbatyai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dbatyai dbatyai merged commit dd6d148 into jerryscript-project:master May 26, 2020
@rerobika rerobika deleted the fix_issue_3751 branch June 16, 2020 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Undesired behaviour

Projects

None yet

3 participants