-
Notifications
You must be signed in to change notification settings - Fork 113
Field named "constructor" #19
Comments
I don't see why a field named There's definitely a bug about PropName being misapplied, which I see in one place: when prohibiting static fields named |
What do you think of this fix? |
It's not fixed. The PropName call and disallowance of "constructor" I was referring to are coming from NonConstructorMethodDefinitions, which is called by ClassDefinitionEvaluation. |
Huh? https://tc39.github.io/proposal-class-fields/#runtime-semantics-class-definition-evaluation |
I was providing links to the sections you mentioned in your comment, for others that might read this thread. |
@waldemarhorwat Thanks, I wasn't thinking about that path (but I believe the other one was a bug as well); will fix. |
Fields named "constructor" should not be omitted from processing. There were previously a couple spec text bugs that led to this occurring (or rather, reaching undefined spec algorithms). Addresses the remaining point in #19
NonConstructorElementDefinitions currently starts with: |
@waldemarhorwat Thanks for pointing this out; I should've checked the generated output more closely (the colon doesn't appear in the source but was inserted by grammardown). Uploading a fix in a minute. |
Previously, messy wording and grammardown syntax was used. Addresses an issue in #19
What is supposed to happen when a field with the name "constructor" is present? The property seems to be silently dropped.
Furthermore, this area of the proposal is currently ill-formed. PropName is applied to things on which it's not well-defined.
The text was updated successfully, but these errors were encountered: