dotnet/roslyn

Change signature can misplace comments, whitespace

オープン

#33,801 opened on 2019/03/01

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

Repository metrics

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

説明

Version Used: 2019 Preview 4

Steps to Reproduce:

    class Program
    {
        static void F(int a, int b, int c, int d)
        {
        }

        static void Main(string[] args)
        {
            F(1,
              2,// 2
              3,
              4);
        }
    }

Remove parameter int a using Change Signature.

Expected Behavior: Comments stay with their logically related argument/parameter

Actual Behavior:

Comments can end up in unexpected locations, sometimes logically related to the wrong entry. Indentation is not preserved.

namespace ConsoleApp3
{
    class Program
    {
        static void F(int b, int c, int d)
        {
        }

        static void Main(string[] args)
        {
            F(2,
                3,// 2
                4);
        }
    }
}

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