Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing parens in yield pipeline expression #10413

Closed
fisker opened this issue Feb 26, 2021 · 0 comments · Fixed by #10446
Closed

Missing parens in yield pipeline expression #10413

fisker opened this issue Feb 26, 2021 · 0 comments · Fixed by #10446
Labels
lang:javascript Issues affecting JS locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:bug Issues identifying ugly output, or a defect in the program

Comments

@fisker
Copy link
Sponsor Member

fisker commented Feb 26, 2021

Found in #10410

Prettier 2.2.1
Playground link

--parser babel

Input:

function * f () {
  return x |> (yield #);
}

Output:

function* f() {
  return x |> yield #;
}

Second Output:

SyntaxError: Unexpected token, expected ";" (2:21)
  1 | function* f() {
> 2 |   return x |> yield #;
    |                     ^
  3 | }
  4 | 

Expected behavior:

@fisker fisker added lang:javascript Issues affecting JS type:bug Issues identifying ugly output, or a defect in the program labels Feb 26, 2021
@github-actions github-actions bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jun 25, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lang:javascript Issues affecting JS locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:bug Issues identifying ugly output, or a defect in the program
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant