You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Interpreter direct native async yield-star does not adopt synchronous generator values #3667
Direct delegation from an interpreted async generator to a native synchronous generator yields the Promise object instead of adopting its value. A rejected promise therefore fulfills the outer next() and leaves the inner generator suspended.
Interpreted output on unchanged baseline 0b44ff4de and after scoped PR #3663 review fix 774f626b4:
resolved false false
Current ECMAScript AsyncFromSyncIteratorContinuation requires value adoption and closing the non-final synchronous iterator on rejection, so the expected output is:
inner finally
rejected true
Node v22.23.2 prints rejected true; it adopts the promise but predates the newer close-on-rejection behavior, so current Test262 is the cleanup oracle.
Pinned Test262 d5e73fc8d2c663554fb72e2380a8c2bc1a318a33 case test/built-ins/AsyncFromSyncIteratorPrototype/next/yield-iterator-next-rejected-promise-close.js fails in the interpreted worker with:
Promise should be rejected Expected a Reject to be thrown asynchronously but no exception was thrown at all
SharpTSAsyncGenerator.DelegateYieldStarAsync directly handles iterable is SharpTSGenerator through DelegateGeneratorAsync; that branch bypasses the async-from-sync value adoption path. A custom iterable factory returning the same native generator uses the acquired iterator path and passes a new finally/error-identity regression in 774f626b4.
This is independent of the acquired custom iterator rejection cleanup fixed for review comment 4546709732. The emitted-adapter omission is separately tracked in #3666. No production fix was expanded into the direct-native branch during that scoped review correction.
Activity