Implement correct construction of let/const declarations and function statements. (#3259)
Various cbc opcodes are added to support the different instantiations. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
committed by
Dániel Bátyai
parent
1c34539997
commit
1edfa81c76
@@ -29,6 +29,9 @@ check_syntax_error ("var a; let a;");
|
||||
check_syntax_error ("var a; const a = 3;");
|
||||
check_syntax_error ("let a; var a;");
|
||||
check_syntax_error ("const a = 3; var x, y, a;");
|
||||
check_syntax_error ("const a");
|
||||
check_syntax_error ("{ const a }");
|
||||
check_syntax_error ("const a, b");
|
||||
check_syntax_error ("let a; { let b; { var a; } }");
|
||||
check_syntax_error ("{ { var a = 4; } }; let a = 3");
|
||||
check_syntax_error ("function a() {}; let a;");
|
||||
@@ -41,4 +44,4 @@ check_syntax_error ("try {} catch (e) { const e = 1; }");
|
||||
check_syntax_error ("let A; class A {}");
|
||||
check_syntax_error ("const A; class A {}");
|
||||
check_syntax_error ("class A {}; let A");
|
||||
check_syntax_error ("class A {}; const A");
|
||||
check_syntax_error ("class A {}; const A = 1");
|
||||
|
||||
Reference in New Issue
Block a user