dotnet/roslyn

Analyzer renaming method name ignores operand of method address expression

Aperta

#50.077 aperta il 19 dic 2020

 (1 commento) (0 reazioni) (1 assegnatario)C# (4257 fork)batch import
Area-IDEBugFeature - RenameIDE-CodeStylehelp wanted

Metriche repository

Star
 (20.414 stelle)
Metriche merge PR
 (Merge medio 6g 17h) (256 PR mergiate in 30 g)

Descrizione

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).

Guida contributor