This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
Calling return() on a suspendedStart iterator helper doesn't seem to call return() on the underlying #266
Closed
Description
openedon Feb 15, 2023
Iterator helpers are specified as generators whose bodies are Abstract Closures. That is, they start in a suspendedStart
state until one of its step methods is called. If you call return()
on a helper before next()
, this goes to GeneratorResumeAbrupt, which has a fast path for going from suspendedStart
-> completed
without evaluating anything. AFAICT this won't call return()
on the underlying, which is the intention.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels