dotnet/roslyn

Renaming a global using alias does not update usages

Open

#74.474 aberto em 22 de jul. de 2024

Ver no GitHub
 (2 comments) (0 reactions) (1 assignee)C# (4.257 forks)batch import
Area-IDEBughelp wanted

Métricas do repositório

Stars
 (20.414 stars)
Métricas de merge de PR
 (Mesclagem média 6d 17h) (256 fundiu PRs em 30d)

Description

Version Used: 17.11.0 Preview 3.0

Steps to Reproduce: Test1.cs

global using MyInteger = int; // Rename here…

Test2.cs

public class C {
  public MyInteger M() => 42; // …or here
}

Rename the MyInteger using alias in any of the two places.

Expected Behavior: The using alias should be updated in both places.

Actual Behavior: Only the using alias declaration is updated. This looks especially weird when you start the rename from the usage.

Guia do colaborador