dotnet/roslyn
Voir sur GitHubSemanticModel.GetDeclaredSymbol doesn't return the getter symbol for C# expression bodied property initializer
Open
#1 060 ouverte le 5 mars 2015
Area-CompilersBugConcept-APILanguage-C#help wanted
Métriques du dépôt
- Stars
- (20 414 stars)
- Métriques de merge PR
- (Merge moyen 6j 17h) (256 PRs mergées en 30 j)
Description
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.