Refactoring ""Extract Method" when a primary constructor property is in the extracted code sends primary constructor property in as a method parameter #73580
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
Milestone
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](https://camo.githubusercontent.com/5602dc106c0ad72d15c11953be7e2658a1f137f5c1c8fca40570663910ca2644/68747470733a2f2f616b612e6d732f64632f696d6167653f6e616d653d4232613763623739303238613634336635623763353565383866636332663134663633383531333935313538343638373439385f556e7469746c65642e706e67267469643d3261376362373930323861363433663562376335356538386663633266313466363338353133393531353834363837343938)
Original Comments
Feedback Bot on 5/16/2024, 00:55 AM:
(private comment, text removed)
Original Solutions
(no solutions)
The text was updated successfully, but these errors were encountered: