dotnet/roslyn

Properties with inaccesible access methods shouldn't be visible

オープン

#71,363 opened on 2023/12/19

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

Repository metrics

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

説明

Steps to Reproduce: Define property like

public Predicate<T>? Selector { protected get; init; }

or even without get method,

Expected Behavior: It shouldn't show by IDE in cases where you can't call these accessors.

Actual Behavior: This member is always visible.

Also, CA1044 diagnostic interpreted as warning by default looks bit annoying. I suggest to interpret it like suggestion by default.

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