Commit 383de2d7 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Fixed conflict in Block statement that caused problems with empty blocks.

parent 47b842bf
......@@ -325,8 +325,8 @@ StatementList_opt
/* ECMA-262 3rd Edition 12.1 */
Block
: '{' StatementList_opt '}'
{ $$ = new_block_statement(ctx, $2); }
: '{' StatementList '}' { $$ = new_block_statement(ctx, $2); }
| '{' '}' { $$ = new_block_statement(ctx, NULL) }
/* ECMA-262 3rd Edition 12.2 */
VariableStatement
......
......@@ -175,6 +175,10 @@ if(true)
tmp = 1;
ok(tmp === 1, "tmp !== 1, if(true) not evaluated?");
if(false) {
}else {
}
var obj3 = { prop1: 1, prop2: typeof(false) };
ok(obj3.prop1 === 1, "obj3.prop1 is not 1");
ok(obj3.prop2 === "boolean", "obj3.prop2 is not \"boolean\"");
......
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