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

JSON.parse needs to not apply the early error rule from B.3.1 #2206

Closed
bakkot opened this issue Oct 15, 2020 · 1 comment · Fixed by #2252
Closed

JSON.parse needs to not apply the early error rule from B.3.1 #2206

bakkot opened this issue Oct 15, 2020 · 1 comment · Fixed by #2252

Comments

@bakkot
Copy link
Contributor

bakkot commented Oct 15, 2020

JSON.parse says

Let completion be the result of parsing and evaluating ! StringToCodePoints(scriptString) as if it was the source text of an ECMAScript Script. The extended PropertyDefinitionEvaluation semantics defined in B.3.1 must not be used during the evaluation.

B.3.1 deals with __proto__ in object literals. But it has two parts: the extended evaluation semantics, and a new early error rule forbidding multiple occurrences of __proto__ in a single object literal. The early error rule is also not applied in implementations (and it would be weird to do so), but the spec text doesn't mention that the rule should not be applied.

@michaelficarra michaelficarra added the editor call to be discussed in the next editor call label Oct 16, 2020
@michaelficarra
Copy link
Member

As per today's editor call, we will mark this change as normative but make the change without asking for consensus (as a spec bugfix) since it matches with what we believe the intent of the committee to have been and with all known implementations.

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