-
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
Normative: Expand text included in "function code" #1091
Conversation
I'll get it done in next few days. |
This looks good to me, but there's a closely related issue (#632) which this doesn't resolve. Actually, it maybe exacerbates that issue: if this is intended to resolve the bugzilla bug by making Possibly we should fix #632 by some other means, but I'd be OK rewording the first two early errors here as part of this PR. There's also some discussion of this problem with @RReverser at tc39/test262-parser-tests#8 (comment). |
By the way, this is probably needs-consensus: if I recall correctly, some people (maybe @ajklein?) were in favor of |
@jugglinmike is there a reason this isn't being applied to |
@bakkot That was my intent. It doesn't seem wrong to me because as per this But to @bmek's point, it sounds like that is a decision from the BugZilla |
@jugglinmike, the thing I'm pointing at here is that the same wording prohibits |
@bakkot I believe the proposed modifications for each of these issues makes them orthogonal:
It seems as though gh-632 can be resolved with a change dedicated to that issue (which I would be happy to write). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could use clarification. I have no idea what this note is trying to say or why it's here.
I raised this at the March 2019 TC39 meeting (slides available here), and the committee elected to change the specification to match current implementation status--that is, to unconditionally include the binding identifier in the definition of "function code". This more restrictive interpretation matches the majority of implementations today, but requires a different change to the specification. I'll follow up with a modified proposal within the next few days. |
Previously reported at https://bugs.ecmascript.org/show_bug.cgi?id=4243 This patch is at attempt to implement the solution agreed upon there. (I think this issue was simply overshadowed by a related discussion on non-simple parameter lists, which ultimately lead to the restriction introduced in ES2016.)
The current specification text allows both of the following forms:
Existing implementations violate that text by producing parsing errors for both.
With this patch applied, only the FunctionExpression will be disallowed, so implementations will continue to be in violation of the spec.