Repository navigation
Generator: next(value?), return?() and throw?(); own object_dictionary lifted; next/return/throw tests - #115
Merged
Merged
Conversation
…y test lifted; tests for next(value), return(), throw() and arrays/strings as an Iterable Needs a compiler with TypeScriptCompiler #982 and #983. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The library side of TSLANG 153. Merge after a compiler release that includes TypeScriptCompiler #982 and #983. This repo's CI tests against the newest released compiler (alpha133 today), which predates both, so until that release the own legs and the new tests will fail here.
Generator<T, TReturn, TNext>:next(value?: TNext): the value is what theyieldthat resumes evaluates to.return?(value)andthrow?(e): a generator declared to return aGeneratorhas them. Under-mm=own,return()exists only for aTthat owns nothing.next, not methods: a method shifts the vtable, and aGeneratorcould then no longer be cast to anIterable.IteratorResultno longer lists these as "not yet".tests/object_dictionary.ts: the "not own" skip is lifted (the fix is in #982).tests/generator_next_return.ts(all models):next(value),return(value)running thefinally,throw(e)caught in the generator, and an array as anIterablethat is still the caller's afterwards.tests/iterable_string.ts: a string as anIterable<string>. It is marked "not own" because afor...ofover anIterable<string>is still refused under own (TSLANG 153).Checked locally: built with the compiler from #983 (on top of #982).
tests.ps1release passes everything under gc (249/250, 1 skipped), rc (244, 6 skipped), none (245, 5 skipped) and own (236, 14 skipped), compiled and JIT. The debug pass was not run because no debug compiler build exists here.🤖 Generated with Claude Code