dotnet/roslyn
Properties with inaccesible access methods shouldn't be visible
开放
#71,363 创建于 2023年12月19日
Area-IDEIntelliSense-Completionhelp wanted
仓库指标
- 星标
- (20,414 个星标)
- PR 合并指标
- (平均合并 6天 17小时) (30 天内合并 256 个 PR)
描述
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.