Phabricator will be unavailable due to database maintenance from 14:00 UTC until 18:00 UTC on Saturday, October 13, 2018.
Bugzilla will remain up during this time. All users have been logged out of Bugzilla
Bugzilla will remain up during this time. All users have been logged out of Bugzilla
Status
()
People
(Reporter: anba, Unassigned)
Tracking
(Blocks: 1 bug)
Firefox Tracking Flags
(firefox52 affected)
Details
Test case:
---
var f = "x";
eval("print(f); { function f(){} }")
---
Expected: Prints "undefined"
Actual: Prints "x"
V8 and Chakra print "x", JSC prints "function f() { }".
ES2017 spec: B.3.3.3, step 7.a.i.i
https://tc39.github.io/ecma262/#sec-web-compat-evaldeclarationinstantiation
Comment 2•2 years ago
|
||
This is patently bizarre and seems like a spec bug. Why should an Annex B synthesized var unconditionally overwrite an existing global var? I'll ask committee.
Comment 3•2 years ago
|
||
The ecma262 related to this is https://github.com/tc39/ecma262/issues/753.
See Also: → https://github.com/tc39/ecma262/issues/753
Comment 4•2 years ago
|
||
TC39 reached consensus that this peculiarity was a spec bug, so marking as INVALID.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Flags: needinfo?(shu)
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•