dotnet/roslyn

SemanticModel.GetDeclaredSymbol doesn't return the getter symbol for C# expression bodied property initializer

Open

#1060 aperta il 5 mar 2015

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)C# (4257 fork)batch import
Area-CompilersBugConcept-APILanguage-C#help wanted

Metriche repository

Star
 (20.414 star)
Metriche merge PR
 (Merge medio 6g 17h) (256 PR mergiate in 30 g)

Descrizione

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.

Guida contributor