Add coverage for arguments as a label in class by JLHwung · Pull Request #5151 · tc39/test262 · GitHub
Skip to content

Add coverage for arguments as a label in class - #5151

Open
JLHwung wants to merge 1 commit into
tc39:mainfrom
JLHwung:class-arguments-label
Open

JLHwung wants to merge 1 commit into
tc39:mainfrom
JLHwung:class-arguments-label

Conversation

@JLHwung

@JLHwung JLHwung commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

The ContainsArguments only returns true for IdentifierReference : Identifier, so a label named arguments and a break/continue targeting it are valid inside class field initializers and static blocks, just like "use strict"; arguments: 1 is valid elsewhere.

Assisted-by: Claude Opus 5.5 noreply@anthropic.com

Among popular browsers: only JSC correctly allows this case, both FF and V8 incorrectly reject it.

The ContainsArguments only returns true for `IdentifierReference : Identifier`, so a label named `arguments` and a `break`/`continue` targeting it are valid inside class field initializers and static blocks, just like `"use strict"; arguments: 1` is valid elsewhere.

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
@JLHwung
JLHwung requested a review from a team as a code owner October 19, 2026 00:11
@github-actions

Copy link
Copy Markdown

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants