Function declaration outside of blocks in direct eval must be ES5.1 compatible. (#3690)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-04-24 10:45:14 +02:00
committed by GitHub
parent 1b1460e61f
commit dcf8ccfd03
3 changed files with 27 additions and 31 deletions
+7
View File
@@ -152,3 +152,10 @@ function f6() {
(((((e)))("assert(p1 === 0)")));
}
f6();
y = 1;
function f7() {
function x() { return y; }
eval("assert(x()() === 5); function y() { return 5 } assert(x()() === 5)");
}
f7()