Skip to content

[ASTPrinter] Fix missing operators in synthesized == impls printed by -print-ast. #76331

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 1 commit into from
Nov 12, 2024

Conversation

allevato
Copy link
Member

@allevato allevato commented Sep 8, 2024

visitBinaryExpr wasn't handling UnresolvedDeclRefExpr nodes, which the synthesized == implementation uses to compare fields/payloads. Also fixed the test that wasn't catching it since it also left out the operators.

`visitBinaryExpr` wasn't handling `UnresolvedDeclRefExpr` nodes, which the
synthesized `==` implementation uses to compare fields/payloads. Also fixed
the test that wasn't catching it since it also left out the operators.
@allevato
Copy link
Member Author

allevato commented Sep 8, 2024

@swift-ci please test

@allevato
Copy link
Member Author

allevato commented Sep 8, 2024

@swift-ci please test macOS platform

@allevato
Copy link
Member Author

allevato commented Sep 9, 2024

@swift-ci please smoke test macOS platform

@allevato
Copy link
Member Author

@swift-ci please smoke test

@allevato
Copy link
Member Author

@swift-ci please test macOS platform

@allevato
Copy link
Member Author

Working on clearing out my PR queue; I'm going to go ahead and merge this small fix. The current behavior is obviously wrong given that it was even encoded in the tests.

@allevato allevato merged commit 4902e69 into swiftlang:main Nov 12, 2024
5 checks passed
@allevato allevato deleted the ast-printer-fixes branch November 12, 2024 12:46
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.

1 participant