Skip to content

Editorial: remove incorrect assertion in SerializeJSONProperty#3842

Merged
ljharb merged 1 commit intotc39:mainfrom
bakkot:rm-incorrect-assert
May 7, 2026
Merged

Editorial: remove incorrect assertion in SerializeJSONProperty#3842
ljharb merged 1 commit intotc39:mainfrom
bakkot:rm-incorrect-assert

Conversation

@bakkot
Copy link
Copy Markdown
Member

@bakkot bakkot commented May 1, 2026

Fixes a bad assert introduced in #3826. I suspect that assertion was added because a subsequent line passes the asserted-on value to SerializeJSONArray, which that PR thought took an Array; I've fixed that too.

I'm neutral between the narrow-but-not-really-helpful "an Array or a Proxy exotic object" (current state of this PR) vs just "an Object". I don't think it's worth spelling out "an Array or a Proxy for (possibly a Proxy for...) an Array".

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

The rendered spec preview for this PR is available as a single page at https://tc39.es/ecma262/pr/3842 and as multiple pages at https://tc39.es/ecma262/pr/3842/multipage .

@linusg
Copy link
Copy Markdown
Member

linusg commented May 1, 2026

I'm neutral between the narrow-but-not-really-helpful "an Array or a Proxy exotic object" (current state of this PR) vs just "an Object"

Mild preference for the former from me, though I agree either would be fine.

Comment thread spec.html Outdated
@michaelficarra michaelficarra added the editor call to be discussed in the next editor call label May 4, 2026
@michaelficarra
Copy link
Copy Markdown
Member

Conclusion from editor call is that an Object for the parameter type is good enough here.

@bakkot
Copy link
Copy Markdown
Member Author

bakkot commented May 7, 2026

Done.

@linusg linusg removed the editor call to be discussed in the next editor call label May 7, 2026
@michaelficarra michaelficarra added the ready to merge Editors believe this PR needs no further reviews, and is ready to land. label May 7, 2026
@ljharb ljharb force-pushed the rm-incorrect-assert branch from 478a702 to bcbc4ed Compare May 7, 2026 18:48
@ljharb ljharb merged commit bcbc4ed into tc39:main May 7, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to merge Editors believe this PR needs no further reviews, and is ready to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants