Closed
Description
André Bargull filed the following bug for Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1317373
This seems like a spec bug to me. EDI probably needs extra steps other than CanDeclareGlobalFunction to see if it should call CreateGlobalFunctionBinding.
The above bug reproduced inline for ease:
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
Metadata
Metadata
Assignees
Labels
No labels