Skip to content
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

We should disallow a default value for required dictionary members in the grammar #569

Closed
bzbarsky opened this issue Jun 30, 2018 · 0 comments

Comments

@bzbarsky
Copy link
Collaborator

When we added TypeWithExtendedAttributes, we split up the DictionaryMember production into two cases:

required TypeWithExtendedAttributes identifier Default ;
Type identifier Default ;

We should remove the "Default" from the "required" case, since there is already prose that says:

A required dictionary member must not have a default value.

It's just that back when we had a single grammar production for dictionary members, with an optional "required" keyword at the front and "Default" at the end, this was not forbidden on the grammar level. But now it would be simple to forbid it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant