tc39 / tc39/test262

assert await precedence

Open
#893 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Capturing a convo from irc #tc39:

[17:55] <+ljharb> what's the correct precedence of await here? https://github.com/babel/babili/issues/460#issue-212303898
[17:55] <+ljharb> is await a || b the same as (await a) || b, or await (a || b)?
[18:16] <+bradleymeck> ljharb: https://tc39.github.io/ecma262/#sec-unary-operators same level as delete / typeof
[19:15] <+ljharb> bradleymeck: ok, so that means the former?[19:20] <+bterlson> it's the former
[19:20] <+bterlson> yield precedence is the latter

I would like to investigate if we cover this precedence. If not, we should add a test for this.

cc @ljharb

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

Start by searching the test suite for existing coverage of await, logical-or, and operator precedence, then compare it with the ECMAScript unary-operator precedence described in the issue and the linked discussion. Done means confirming whether await a || b is covered and adding a test if it is not.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.