mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Fix for propagating arguments reference from nested blocks. (#3309)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
parent
55c7590767
commit
b4b55a67a2
@ -371,6 +371,7 @@ scanner_push_literal_pool (parser_context_t *context_p, /**< context */
|
||||
if (!(status_flags & SCANNER_LITERAL_POOL_FUNCTION))
|
||||
{
|
||||
JERRY_ASSERT (prev_literal_pool_p != NULL);
|
||||
status_flags |= SCANNER_LITERAL_POOL_NO_ARGUMENTS;
|
||||
|
||||
if (prev_literal_pool_p->status_flags & SCANNER_LITERAL_POOL_IN_WITH)
|
||||
{
|
||||
|
||||
@ -129,3 +129,17 @@ fn_expr (1);
|
||||
(function () {
|
||||
var a = [arguments];
|
||||
})();
|
||||
|
||||
function nested_args()
|
||||
{
|
||||
var a;
|
||||
for (var i = 0; i < 1; i++)
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
a = arguments[i];
|
||||
}
|
||||
}
|
||||
assert(a === 3);
|
||||
}
|
||||
nested_args(3);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user