Skip to content

Fixed issue #72085 where BinaryExpr fix-it suggested missing operator. #72090

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
Mar 12, 2024

Conversation

CrazyFanFan
Copy link
Contributor

Add missing operator to BinaryExpr fix-it suggestions.

Resolves #72085.

@CrazyFanFan CrazyFanFan force-pushed the fix/crazy_fan/72085 branch from ad3a1d1 to ac1ac02 Compare March 9, 2024 05:37
@@ -5863,12 +5863,16 @@ bool OutOfOrderArgumentFailure::diagnoseAsError() {

// Move requires postfix comma only if argument is moved in-between
// other arguments.
bool requiresComma =
!isExpr<BinaryExpr>(anchor) && PrevArgIdx != args->size() - 1;
std::string sign;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: I would call this argumentSeparator or something. But otherwise LGTM.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, it's all set to argumentSeparator. Thanks

@CrazyFanFan CrazyFanFan force-pushed the fix/crazy_fan/72085 branch from ac1ac02 to b2c054a Compare March 12, 2024 04:49
@xedin
Copy link
Contributor

xedin commented Mar 12, 2024

@swift-ci please test

@xedin xedin merged commit 16d3997 into swiftlang:main Mar 12, 2024
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.

Non-sensical fix-it (and weird error message) when trying to multiply a Duration by an integer
4 participants