Repository navigation
tests: Map and Set forEach callbacks that keep their keys and values - #103
Merged
Merged
Conversation
Callbacks declaring fewer parameters than forEach passes, pushing the keys and values into captured arrays, two of them over one Map; the Map and the Set then delete an entry. Under -mm=own each callback gets a copy of what it keeps (compiler: own callbacks declaring fewer parameters). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Companion to ASDAlexander77/TypeScriptCompiler#872: merge that PR first.
tests/map_set_forEach_captures.ts: callbacks over a Map and a Set that keep what they are given.forEachpasses, and two of them over one Map disagree on what they keep.Under
-mm=ownthis needs the compiler change: each callback gets a copy of the string it keeps. With the compiler branch it passes under own, gc, none and rc (JIT), and the rest of the suite passes in all four models.🤖 Generated with Claude Code