dotnet/roslyn

Renaming a nested type should offer to update filename using Outer.Inner.cs convention

Open

#60,054 创建于 2022年3月9日

在 GitHub 查看
 (3 评论) (1 反应) (2 负责人)C# (4,257 fork)batch import
Area-IDEBugFeature - Renamehelp wanted

仓库指标

Star
 (20,414 star)
PR 合并指标
 (平均合并 6天 17小时) (30 天内合并 256 个 PR)

描述

Version Used: 17.2.0 Preview 3.0 [32308.589.main]

Steps to Reproduce:

Create a file Outer.Inner.cs containing:

partial class Outer
{
    class Inner {}
}

Invoke rename on the Inner symbol.

Notice that the rename dialog does not offer to rename the file.

image

Expected Behavior:

Renaming Inner to Foo also renames the source file to Outer.Foo.cs.

Equally, renaming Outer to Bar further renames the file to Bar.Foo.cs (and renames any other files with the same prefix that have corresponding nested types).

Equally files nested three or more levels deep should support this A.B.C.cs convention.

Actual Behavior:

Rename for the file is disabled.

贡献者指南