dotnet/roslyn

nameof autocompletion on nested class doesn't work for parent class members

オープン

#24,500 opened on 2018/01/28

 (7 件のコメント) (0 件のリアクション) (0 人の担当者)C# (4,257 件のフォーク)batch import
Area-CompilersBugLanguage-C#help wanted

Repository metrics

Stars
 (20,414 個のスター)
PR merge metrics
 (平均マージ 6d 17h) (30d で 256 merged PRs)

説明

Version Used: VS 15.5.5

Steps to Reproduce:

  1. Create a nested class, like this:
class A
{
    string PropertyA { get; }

    class B
    {
        void MethodB()
        {
            Console.WriteLine(nameof(PropertyA)));
        }
    }
}
  1. When typing nameof(P, PropertyA isn'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.

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