dotnet/roslyn

The "Make method async" refactoring adds "Async" to interface, but doesn't change the return type to Task<>

Open

#40,508 opened on Dec 19, 2019

View on GitHub
 (1 comment) (2 reactions) (0 assignees)C# (4,257 forks)batch import
Area-IDEBugDeveloper Communityhelp wanted

Repository metrics

Stars
 (20,414 stars)
PR merge metrics
 (Avg merge 6d 17h) (256 merged PRs in 30d)

Description

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


I changed a method to use async methods (await . SaveChangesAsync() in Entity Framework). The helpful refactoring offered to make the method async, which it did successfully. It also renamed all occurances of my method appending the suffix Async, which is also great. It also changed the return type of my method to be Task<>, which is also great.

However, it did not change the return type of my interface that the method is implmenting to be Task<>. It clearly did the right thing in renaming the method name in the interface, but just appears to have missed changing the return type. I can obviously make the correction by hand, and I'm much better with the refactoring feature, but it's just falling one step short of being fully helpful.


Original Comments

Visual Studio Feedback System on 11/7/2019, 10:52 PM:

Visual Studio Feedback System on 11/13/2019, 04:37 PM:


Original Solutions

(no solutions)

Contributor guide