Repository navigation
[TS] Preserve async and sync iterator semantics in for-await (#385) - #421
Merged
Merged
Conversation
CaelmBleidd
force-pushed
the
caelmbleidd/ts-373-rest-parameter-contract
branch
from
October 7, 2026 21:41
fe89681 to
790f734
Compare
CaelmBleidd
force-pushed
the
caelmbleidd/ts-385-for-await
branch
from
October 7, 2026 21:41
1471922 to
a68ddcb
Compare
CaelmBleidd
force-pushed
the
caelmbleidd/ts-373-rest-parameter-contract
branch
from
October 10, 2026 17:38
790f734 to
9d6f52d
Compare
CaelmBleidd
force-pushed
the
caelmbleidd/ts-385-for-await
branch
from
October 10, 2026 17:40
a68ddcb to
fa87a57
Compare
CaelmBleidd
changed the base branch from
caelmbleidd/ts-373-rest-parameter-contract
to
neo
October 10, 2026 17:40
This was referenced Oct 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For-await lowering now selects Symbol.asyncIterator with a Symbol.iterator fallback, caches next with its receiver, validates protocol objects, and unwraps sync iterator values through Async-from-Sync await behavior. The iterable is snapshotted before getter side effects can reassign its binding. Runtime errors reuse the shared iterator helper, and focused tests cover rejected values and iterator closing.
Validation: fresh typecheck and focused frontend tests (22 passed) on the exact rewritten head. The complete semantic stack at original #425 also passed the frontend build and 622 tests. Rebase preserved the original production tree exactly. For #421 and later, the expected tree also carries the reviewed Kotlin for-await assertion corrections. Frontend/JSON/model correctness does not establish downstream USVM execution support.
Fixes #385