Skip to content

Added test for RCS1196#1235

Merged
josefpihrt merged 10 commits intodotnet:mainfrom
jakubreznak:fix/RCS1196
Nov 20, 2023
Merged

Added test for RCS1196#1235
josefpihrt merged 10 commits intodotnet:mainfrom
jakubreznak:fix/RCS1196

Conversation

@jakubreznak
Copy link
Contributor

added test for RCS1196
resolve #1128

I tested it and there were no redundant parentheses. I also wrote test for it.

@josefpihrt
Copy link
Collaborator

I took a look at it and I turned out that the problem is with the refactoring which has the same functionality as the analyzer:

context.RegisterRefactoring(
CallExtensionMethodAsInstanceMethodRefactoring.Title,
ct =>
{
return context.Document.ReplaceNodeAsync(
analysis.InvocationExpression,
analysis.NewInvocationExpression,
ct);
},
RefactoringDescriptors.CallExtensionMethodAsInstanceMethod);

@josefpihrt
Copy link
Collaborator

@jakubreznak Could you fix it?

@jakubreznak
Copy link
Contributor Author

Yeah, sorry, i will look at it, but I am not able to do it this week.

@jakubreznak
Copy link
Contributor Author

I looked at it and fixed it, also added a test. Thank you for your suggestion.

@josefpihrt josefpihrt merged commit 695c814 into dotnet:main Nov 20, 2023
@josefpihrt
Copy link
Collaborator

@jakubreznak Thanks for the contribution!

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.

Redundant parentheses in "Call extension method as instance method"

2 participants

Comments