Skip to content

Commit

Permalink
Issue jerryscript-project#1389 fixed in parser_compute_inicies by res…
Browse files Browse the repository at this point in the history
…olving local variable hiding.

JerryScript-DCO-1.0-Signed-off-by: István Kádár [email protected]
  • Loading branch information
ktorpi committed Oct 21, 2016
1 parent c8f2747 commit 7581d14
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jerry-core/parser/js/js-parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,11 @@ parser_compute_indicies (parser_context_t *context_p, /**< context */

if (!(literal_p->status_flags & LEXER_FLAG_FUNCTION_NAME))
{
literal_p = (lexer_literal_t *) parser_list_iterator_next (&literal_iterator);
lexer_literal_t *func_literal_p = (lexer_literal_t *) parser_list_iterator_next (&literal_iterator);

JERRY_ASSERT (literal_p != NULL
&& literal_p->type == LEXER_FUNCTION_LITERAL);
literal_p->prop.index = init_index;
JERRY_ASSERT (func_literal_p != NULL
&& func_literal_p->type == LEXER_FUNCTION_LITERAL);
func_literal_p->prop.index = init_index;
}
}

Expand Down
4 changes: 4 additions & 0 deletions tests/jerry/regression-test-issue-1389.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7581d14

Please sign in to comment.