« Bugzilla Issues Index
#4339 — Annex E: B.3.5 and FunctionDeclaration in eval code
- bug_id:
4339
- creation_ts:
2015-04-29 09:42:00 -0700
- short_desc:
Annex E: B.3.5 and FunctionDeclaration in eval code
- delta_ts:
2015-10-02 13:14:00 -0700
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 38: April 14, 2015 Final Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- priority:
Normal
- bug_severity:
normal
- everconfirmed:
true
- reporter:
André Bargull
- assigned_to:
Allen Wirfs-Brock
- commentid:
14338
- comment_count:
0
- who:
André Bargull
- bug_when:
2015-04-29 09:42:40 -0700
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
---
- commentid:
14420
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2015-05-19 11:35:54 -0700
fixed in rev39 publication draft
added an annex E item, but also added FunctionDeclarations to the Annex B.3.5 alternative semantis.