archives

« Bugzilla Issues Index

#4339 — Annex E: B.3.5 and FunctionDeclaration in eval code


Another entry for Annex E.

The following code was valid in ES5, but now it throws a SyntaxError.

---
function t() {
try {
throw null;
} catch (e) {
eval("function e() { return 'ok' }"); // Throws SyntaxError in ES2015
}
return e();
}
t(); // Returns "ok" in ES5
---


fixed in rev39 publication draft

added an annex E item, but also added FunctionDeclarations to the Annex B.3.5 alternative semantis.