mirror of
https://github.com/reactos/wine.git
synced 2025-02-20 12:50:53 +00:00
jscript: Fixed array literal length calculation.
This commit is contained in:
parent
f1f2e8e6c5
commit
45cd5bc4a2
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user