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

__proto__: something should be rejected in the Record grammar #313

Closed
rricard opened this issue Jul 8, 2022 · 2 comments · Fixed by #315
Closed

__proto__: something should be rejected in the Record grammar #313

rricard opened this issue Jul 8, 2022 · 2 comments · Fixed by #315

Comments

@rricard
Copy link
Member

rricard commented Jul 8, 2022

This was brought up in #71 (comment) but the following forms should be rejected by the parser:

#{
    __proto__: something,
    "__proto__": somehting,
}
@nicolo-ribaudo
Copy link
Member

Note that

#{
  ["__proto__"]: something
}

would still be valid (because also in objects it sets a __proto__ property and not the prototype), this is just to avoid confusion since records don't have prototypes.

@rricard
Copy link
Member Author

rricard commented Jul 8, 2022

Yes! Thank you for the precision, I did discuss it in #71 (comment) but forgot to port it here

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

Successfully merging a pull request may close this issue.

2 participants