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

NeverInfixPattern: allow to match lhs as well #3705

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

kitbellew
Copy link
Collaborator

Helps with #3699.

@@ -71,6 +71,6 @@ behaviour of "..." {
behavior.of("..." {
Copy link
Contributor

Choose a reason for hiding this comment

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

How is behavior actually matched here? The exclude filter has behaviour

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the exclude filter for prohibiting infix matches "behaviour" which is why only "behaviour" is not rewritten, and everything else (including "behavior" and "shouldBe") is.

Copy link
Contributor

Choose a reason for hiding this comment

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

ach makes sense! I was thinking the other way around

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i know... i am frequently confused myself with the double negative ("never" and "exclude"), plus a little bit with neverInfix when used with AvoidInfix :)

@kitbellew kitbellew merged commit 34ac302 into scalameta:master Nov 27, 2023
9 checks passed
@kitbellew kitbellew deleted the 3699_5 branch November 27, 2023 15:58
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.

2 participants