dotnet/roslyn

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

開放

#47,155 建立於 2020年8月26日

 (3 則留言) (0 個反應) (0 位負責人)C# (4,257 個分叉)batch import
Area-IDEBugFeature - Renamehelp wanted

倉庫指標

星標
 (20,414 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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;
        }

貢獻者指南