dotnet/roslyn
nameof autocompletion on nested class doesn't work for parent class members
开放
#24,500 创建于 2018年1月28日
Area-CompilersBugLanguage-C#help wanted
仓库指标
- 星标
- (20,414 个星标)
- PR 合并指标
- (平均合并 6天 17小时) (30 天内合并 256 个 PR)
描述
Version Used: VS 15.5.5
Steps to Reproduce:
- Create a nested class, like this:
class A
{
string PropertyA { get; }
class B
{
void MethodB()
{
Console.WriteLine(nameof(PropertyA)));
}
}
}
- When typing
nameof(P,PropertyAisn't shown as a suggestion, but the code compiles.
Expected Behavior:
The code compiles and PropertyA is shown as suggestion.
Actual Behavior:
The code compiles, but PropertyA isn't shown as suggestion.