dotnet/roslyn

Renaming a global using alias does not update usages

Open

#74,474 opened on Jul 22, 2024

View on GitHub
 (2 comments) (0 reactions) (1 assignee)C# (4,257 forks)batch import
Area-IDEBughelp wanted

Repository metrics

Stars
 (20,414 stars)
PR merge metrics
 (Avg merge 6d 17h) (256 merged PRs in 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.

Contributor guide