dotnet/roslyn

Analyzer renaming method name ignores operand of method address expression

Offen

#50.077 geöffnet am 19.12.2020

 (1 Kommentar) (0 Reaktionen) (1 zugewiesene Person)C# (4.257 Forks)batch import
Area-IDEBugFeature - RenameIDE-CodeStylehelp wanted

Repository-Metriken

Stars
 (20.414 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 6T 17h) (256 gemergte PRs in 30 T)

Beschreibung

Version Used: Visual Studio 16.8.2

Steps to Reproduce:

  1. In any C# source file, type:
    class A
    {
        private unsafe static void M1()
        {
            var xx = (delegate*<void>)(&M1);
        }
    }
  1. Change the name of M1 to M2 and use the "Rename 'M1' to 'M2'" refactoring action in VS.

Expected Behavior:

The expression in the initializer of xx changed to (delegate*<void>)(&M2).

Actual Behavior:

The expression in the initializer of xx remain unchanged as (delegate*<void>)(&M1).

Contributor Guide