tc39 / tc39/test262

Missing tests for the syntax refinement of PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList

Open
#3,282 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

coverage
Dominant language
JavaScript
Stars
2.8k
Forks
564
Avg merge
3d 7h
Merged PRs (30d)
10

Description

CoverParenthesizedExpressionAndArrowParameterList includes a refinement for PrimaryExpression to reject the otherwise-permissible ( Expression , ) :

Supplemental Syntax

When processing an instance of the production
PrimaryExpression[Yield, Await] : CoverParenthesizedExpressionAndArrowParameterList[?Yield, ?Await]
the interpretation of CoverParenthesizedExpressionAndArrowParameterList is refined using the following grammar:

ParenthesizedExpression[Yield, Await] : ( Expression[+In, ?Yield, ?Await] )

This refinement invalidates what would otherwise be valid expressions such as void (Date,) and (Date,) = null. Every engine except XS seems to get this right, and it has now been reported there.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test path is named. Start by locating the existing test262 coverage for PrimaryExpression and CoverParenthesizedExpressionAndArrowParameterList, then add cases for void (Date,) and (Date,) = null and verify they are rejected according to the cited ECMAScript refinement.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.