dotnet/roslyn
在 GitHub 查看SemanticModel.GetDeclaredSymbol doesn't return the getter symbol for C# expression bodied property initializer
Open
#1,060 创建于 2015年3月5日
Area-CompilersBugConcept-APILanguage-C#help wanted
仓库指标
- Star
- (20,414 star)
- PR 合并指标
- (平均合并 6天 17小时) (30 天内合并 256 个 PR)
描述
None of the descendant nodes of expression bodied property in C# returns the getter method symbol for that property when GetDeclaredSymbol is invoked on them. This seems wrong as the getter method symbol has IsImplicityDeclared = false, and also has its declaring syntax node as the ArrowExpressionClauseSyntax.
I think we want to handle GetDeclaredSymbol(ArrowExpressionClauseSyntax) to return the property getter if the given arrow expression is parented by a BasePropertyDeclarationSyntax.