dotnet / dotnet/roslyn

Renaming a global using alias does not update usages

Open
#74,474 2 comments 0 reactions 1 assignee Claimed by @jasonmalinowski View on GitHub
Area-IDE Bug help wanted
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

**Version Used**:
17.11.0 Preview 3.0

**Steps to Reproduce**:
Test1.cs
```cs
global using MyInteger = int; // Rename here…
```
Test2.cs
```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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.