Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Refactoring ""Extract Method" when a primary constructor property is in the extracted code sends primary constructor property in as a method parameter #73580

Closed
vsfeedback opened this issue May 20, 2024 · 1 comment · Fixed by #76179
Labels
Area-IDE Feature Request help wanted The issue is "up for grabs" - add a comment if you are interested in working on it
Milestone

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


If you do the "Extract method" refactoring on a block of code that contains a primary constructor parameter (new in C#12), the extraction succeeds, but the primary constructor is passed in as a method parameter into the new method. The extract method refactoring should not pass this variable in, but instead, reference it from inside of the new method directly.
Untitled.png


Original Comments

Feedback Bot on 5/16/2024, 00:55 AM:

(private comment, text removed)


Original Solutions

(no solutions)

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels May 20, 2024
@TahirAhmadov
Copy link

I can confirm, this is an issue for me, too, version 17.9.2.

@CyrusNajmabadi CyrusNajmabadi added help wanted The issue is "up for grabs" - add a comment if you are interested in working on it Feature Request and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Jun 4, 2024
@CyrusNajmabadi CyrusNajmabadi added this to the Backlog milestone Jun 4, 2024
@github-project-automation github-project-automation bot moved this to InQueue in Small Fixes Aug 28, 2024
@github-project-automation github-project-automation bot moved this from InQueue to Completed in Small Fixes Dec 3, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Area-IDE Feature Request help wanted The issue is "up for grabs" - add a comment if you are interested in working on it
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

3 participants