jscript: Fixed conflict in Block statement that caused problems with empty blocks.
This commit is contained in:
parent
47b842bff7
commit
383de2d79a
|
@ -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\"");
|
||||
|
|
Loading…
Reference in New Issue