dotnet/roslyn

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

Ouverte

#40 508 ouverte le 19 déc. 2019

 (1 commentaire) (2 réactions) (0 personne assignée)C# (4 257 forks)batch import
Area-IDEBugDeveloper Communityhelp wanted

Métriques du dépôt

Stars
 (20 414 étoiles)
Métriques de merge PR
 (Merge moyen 6j 17h) (256 PRs mergées en 30 j)

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)

Guide contributeur