jscript: Don't use EXPR_NEWREF in forin_statement_event.

oldstable
Jacek Caban 2011-12-12 14:43:35 +01:00 committed by Alexandre Julliard
parent 106fcb8e87
commit f8e3e92be3
2 changed files with 6 additions and 1 deletions

View File

@ -1012,7 +1012,7 @@ HRESULT forin_statement_eval(script_ctx_t *ctx, statement_t *_stat, return_type_
return hres;
}
hres = expr_eval(ctx, stat->in_expr, EXPR_NEWREF, &rt->ei, &exprval);
hres = expr_eval(ctx, stat->in_expr, 0, &rt->ei, &exprval);
if(FAILED(hres))
return hres;

View File

@ -803,6 +803,11 @@ obj1 = new Object();
for(obj1.nonexistent; tmp; tmp = false)
ok(!("nonexistent" in obj1), "nonexistent added to obj1");
obj1 = new Object();
for(tmp in obj1.nonexistent)
ok(false, "for(tmp in obj1.nonexistent) called with tmp = " + tmp);
ok(!("nonexistent" in obj1), "nonexistent added to obj1 by for..in loop");
ok((void 1) === undefined, "(void 1) !== undefined");
var inobj = new Object();