Skip to content

NeverInfixPattern: allow to match lhs as well - #3705

Merged
kitbellew merged 1 commit into
scalameta:masterfrom
kitbellew:3699_5
Nov 27, 2023
Merged

kitbellew merged 1 commit into
scalameta:masterfrom
kitbellew:3699_5

Conversation

@kitbellew

Copy link
Copy Markdown
Collaborator

Helps with #3699.

@kitbellew
kitbellew requested a review from tgodzik November 24, 2023 18:47
@@ -71,6 +71,6 @@ behaviour of "..." {
behavior.of("..." {

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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