dotnet/roslyn

Make Method Async renames wrong method if a method with the same name already exists

オープン

#47,155 opened on 2020/08/26

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)C# (4,257 件のフォーク)batch import
Area-IDEBugFeature - Renamehelp wanted

Repository metrics

Stars
 (20,414 個のスター)
PR merge metrics
 (平均マージ 6d 17h) (30d で 256 merged PRs)

説明

Version Used: VS 16.7.2

Steps to Reproduce: Create the following Methods

        static int Foo()
        {
            return 42;
        }

        static int Foo()
        {
            await Task.Delay(42);
            return 1;
        }

Place the cursor on the await and select Make method async refactoring Expected Behavior:

        static int Foo()
        {
            return 42;
        }

        static async Task<int> FooAsync()
        {
            await Task.Delay(42);
            return 1;
        }

Actual Behavior:

        static int FooAsync()
        {
            return 42;
        }

        static async Task<int> Foo()
        {
            await Task.Delay(42);
            return 1;
        }

コントリビューターガイド