Commit 45cd5bc4 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Fixed array literal length calculation.

parent f1f2e8e6
......@@ -725,7 +725,7 @@ ArrayLiteral
: '[' Elision_opt ']' { $$ = new_array_literal_expression(ctx, NULL, $2); }
| '[' ElementList ']' { $$ = new_array_literal_expression(ctx, $2, 0); }
| '[' ElementList ',' Elision_opt ']'
{ $$ = new_array_literal_expression(ctx, $2, $4); }
{ $$ = new_array_literal_expression(ctx, $2, $4+1); }
/* ECMA-262 3rd Edition 11.1.4 */
ElementList
......
......@@ -592,6 +592,8 @@ ok(tmp["3"] === 2, "tmp[3] !== 2");
ok(tmp["6"] === true, "tmp[6] !== true");
ok(tmp[2] === 1, "tmp[2] !== 1");
ok([1,].length === 2, "[1,].length !== 2");
tmp = 0;
while(tmp < 4) {
ok(tmp < 4, "tmp >= 4");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment