Commit 43a2d8b9 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

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

parent 59564606
......@@ -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);
......
......@@ -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;
......
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