Skip to content

Conversation

bnoordhuis
Copy link
Contributor

Change the behavior of the following methods:

  • Set.prototype.isDisjointFrom
  • Set.prototype.isSupersetOf

Specifically, for iterators coming from set-like objects:

  • DO NOT invoke return() when the iterator is exhausted
  • DO invoke return() when the iterator is NOT exhausted

test262 doesn't test it but the spec seems to mandate it and V8 and SM both implement it.

Change the behavior of the following methods:

- Set.prototype.isDisjointFrom
- Set.prototype.isSupersetOf

Specifically, for iterators coming from set-like objects:

- DO NOT invoke return() when the iterator is exhausted
- DO invoke return() when the iterator is NOT exhausted

test262 doesn't test it but the spec seems to mandate it and V8 and SM
both implement it.
@bnoordhuis bnoordhuis merged commit 6167dcb into quickjs-ng:master Sep 27, 2025
127 checks passed
@bnoordhuis bnoordhuis deleted the setlike-iter-return branch September 27, 2025 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants