dotnet/roslyn

Renaming a global using alias does not update usages

Open

#74,474 opened on 2024年7月22日

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
 (平均マージ 6d 17h) (30d で 256 merged PRs)

説明

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.

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