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

Printer (compact): invalid generated code for prefix unary operators #1835

Closed
DmitrySoshnikov opened this issue Jun 25, 2015 · 2 comments
Closed
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@DmitrySoshnikov
Copy link
Contributor

Since parens aren't handled, printer (compact mode) generates invalid code for the following snippet we have in our code base:

return (
  ((60 *  end_pieces[0])   ( end_pieces[1])) -
  ((60 *  start_pieces[0])   ( start_pieces[1]))
);

Generated:

return (
 60* end_pieces[0]  end_pieces[1]-(
 60* start_pieces[0]  start_pieces[1]));
@sebmck sebmck closed this as completed in 13e910e Jun 25, 2015
@DmitrySoshnikov
Copy link
Contributor Author

Thanks!

@sebmck
Copy link
Contributor

sebmck commented Jun 25, 2015

Fixed as of 5.6.8, thanks! Created issue #1837 to add smoke tests to ensure this and similar issues don't happen again.

@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jul 15, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

2 participants