Skip to content

fix(cpp1): emit discard with correct precedence #570

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

Merged
merged 3 commits into from
Aug 11, 2023

Conversation

JohelEGP
Copy link
Contributor

@JohelEGP JohelEGP commented Aug 5, 2023

Resolves #567.

Testing summary:

100% tests passed, 0 tests failed out of 724

Total Test time (real) =  35.00 sec

Acknowledgements:

@JohelEGP
Copy link
Contributor Author

JohelEGP commented Aug 5, 2023

I'm going to have to use static_cast<void>():

Waarudo_utilities.h2:109:12: error: variable has incomplete type 'void'
  109 |       void(_);
      |            ^
Waarudo.cpp2:255:16: error: variable has incomplete type 'void'
  255 |     void(      size);
      |                ^

@hsutter
Copy link
Owner

hsutter commented Aug 10, 2023

Thanks! I think this looks right -- does it need the above minor rebasing after today's merges?

@JohelEGP JohelEGP force-pushed the discard_precedence branch from bcd5e1b to 1960637 Compare August 10, 2023 16:01
@hsutter
Copy link
Owner

hsutter commented Aug 11, 2023

Thanks, looks good!

@hsutter hsutter merged commit 9c6ac65 into hsutter:main Aug 11, 2023
@JohelEGP JohelEGP deleted the discard_precedence branch August 11, 2023 03:13
zaucy pushed a commit to zaucy/cppfront that referenced this pull request Dec 5, 2023
* test: add test case for discard precedence

* fix(cpp1): emit discard with correct precedence

* refactor: update comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Assignment to _ lowers to wrong precedence
2 participants