dotnet/roslyn
View on GitHubnameof autocompletion on nested class doesn't work for parent class members
Open
#24,500 opened on Jan 28, 2018
Area-CompilersBugLanguage-C#help wanted
Repository metrics
- Stars
- (20,414 stars)
- PR merge metrics
- (Avg merge 6d 17h) (256 merged PRs in 30d)
Description
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.