jscript: Don't pass EXPR_NEWREF to name expression in array_expression_eval.

oldstable
Jacek Caban 2011-12-15 15:43:43 +01:00 committed by Alexandre Julliard
parent 595646066b
commit 43a2d8b990
2 changed files with 6 additions and 2 deletions

View File

@ -1473,7 +1473,7 @@ HRESULT array_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD flag
if(FAILED(hres))
return hres;
hres = expr_eval(ctx, expr->expression2, EXPR_NEWREF, ei, &exprval);
hres = expr_eval(ctx, expr->expression2, 0, ei, &exprval);
if(SUCCEEDED(hres)) {
hres = exprval_to_value(ctx, &exprval, ei, &val);
exprval_release(&exprval);

View File

@ -220,9 +220,13 @@ ok((~tmp.nonexistent) === -1, "!tmp.nonexistent = " + ~tmp.nonexistent);
ok(!("nonexistent" in tmp), "nonexistent is in tmp after '~' expression")
tmp = new Object();
ok(isNaN(tmp.nonexistent), "!tmp.nonexistent = " + (+tmp.nonexistent));
ok(isNaN(+tmp.nonexistent), "!tmp.nonexistent = " + (+tmp.nonexistent));
ok(!("nonexistent" in tmp), "nonexistent is in tmp after '+' expression")
tmp = new Object();
tmp[tmp.nonexistent];
ok(!("nonexistent" in tmp), "nonexistent is in tmp after array expression")
tmp = 0;
if(true)
tmp = 1;