Skip to content

Add tests for continue to any label of a loop's label set - #5170

Open
trackoor wants to merge 1 commit into
tc39:mainfrom
trackoor:continue-label-set
Open

trackoor wants to merge 1 commit into
tc39:mainfrom
trackoor:continue-label-set

Conversation

@trackoor

@trackoor trackoor commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

In a: b: for (…) { continue a; } both labels are in the loop's labelSet, so LoopContinues returns true for continue a as well as continue b. The existing tests (labeled-continue.js, simple-and-labeled.js, …) put a single label on the loop.

Engines that got this wrong:

labeled-continue-label-set.js covers for, while, do-while, for-in and for-of with two or three labels; labeled-continue-label-set-nested.js continues an outer loop by either label from an inner loop.

Both files pass (sloppy and strict) on V8 15.9.109, SpiderMonkey 160.0b5, JavaScriptCore (macOS 26.3), engine262 67a6b615, GraalJS 25.5.5, XS 17.9.3 and Hermes 0.11.0. Boa nightly (2026-11-06) times out on both; quickjs-ng e22ce4d and QuickJS 712e8c0 throw a SyntaxError.

@trackoor
trackoor requested a review from a team as a code owner November 6, 2026 03:43
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

2 new or modified tests were run on 7 engines.

View workflow run

Test Engine262 GraalJS JavaScriptCore QuickJS SpiderMonkey V8 XS
language/statements/continue/labeled-continue-label-set-nested.js ✅ ✅ ✅ ❌ ✅ ✅ ✅
language/statements/continue/labeled-continue-label-set.js ✅ ✅ ✅ ❌ ✅ ✅ ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant