-
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
Editorial Clarification: Contains definition in 5.2.4 may be misleading #2251
Comments
Hm. The text surrounding the algorithm steps you quote is pretty explicit about the fact that the given definition is overridden for some productions, to my eyes. Is the ask that it be clearer about which ones, or am I misunderstanding? Either way, I'll be sure to revise this as part of #1950, which will hopefully make this totally clear by putting the whole definition in a single place. |
I agree with @bakkot, I don't think this would've been a problem if you could see the definition of |
That sounds like a much more comprehensive change, and I would be in favor of that! |
Contains is now defined in a single place, and all usages of it link there. Hopefully it's clearer now. |
I don't know if I am the only person who will be confused with this, but worth asking. When preparing to introduce top level await on the stream, I came across the following line:
Let async be body Contains await.
-- Knowing what top level await does, obviously, this must be ignoring functions right?I double checked in the spec. The first definition, when looking it up in the spec is this one here: https://www.ecma-international.org/ecma-262/11.0/index.html#sec-static-semantic-rules
This is a bit misleading, as later on we have notes like this one:
https://www.ecma-international.org/ecma-262/11.0/index.html#sec-object-initializer-static-semantics-contains
That seems pretty important. Maybe we should add this note to the description of the algorithm above?
The text was updated successfully, but these errors were encountered: