-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Legacy hoisting for function arguments() {}
still not correct?
#991
Comments
This test from test262 also asserts the wrong thing: |
cc @rwaldron ^^ |
I'm not so happy with how complicated it turns out to support legacy hosting of functions named |
@littledan |
cc @syg |
Yeah that strongly argues for codifying it in Annex B. Can't say I'd consider this to be high priority, but all other things being equal we should reflect reality. |
Fixed by the merge of PR #1636 (and permanently fixed by #2052).
Fixed by the merge of PR #2951. |
refs: #815, #889, #891
Per the current spec semantics:
Explanation:
function arguments() {}
is an applicable legacy block-scoped function, because it can be replaced withvar arguments
without causing an early SyntaxError, andarguments
is not a parameter name (B.3.3.1 Changes to FunctionDeclarationInstantiation, step 1.a.ii).varEnvRec
, because the function name is "arguments".varEnvRec
.fenvRec
doesn't have a binding for "arguments".Maybe we just need something like this in B.3.3.1:
And two nits in B.3.3.1 Changes to FunctionDeclarationInstantiation:
initializedBindings
->instantiatedVarNames
.The text was updated successfully, but these errors were encountered: