Fix couple of analyzer driver issues for C# expression bodied member nodes - #911
Merged
Conversation
1. Add declaration info for ArrowExpressionClauseSyntax: For properties and indexers, this node declares the getter method symbol whose IsImplicitlyDeclared flag is false and hence the analyzer symbol actions need to be invokedfor this getter. 2. Previously executable code block actions for nodes within ArrowExpressionClauseSyntax were executed with parenting property symbol as the owning symbol. This change fixes it to have the declared getter method symbol as the owner of executable block for ArrowExpressionClauseSyntax.
Contributor
|
👍 |
Contributor
There was a problem hiding this comment.
It's somewhat strange that the new shorthand syntax for property declarations has "Expression" in its name instead of "Declaration", but that's obviously not an issue for this PR. (Confused by the name, at first I thought this might be related to pointer dereferencing in unsafe code.)
I guess this is technically part of the expression that is the property's body. It still looks strange.
Contributor
|
I sign off. |
mavasani
added a commit
that referenced
this pull request
Feb 27, 2015
Fix couple of issues in CSharpDeclarationComputer (issue #592): 1.Add declaration info for ArrowExpressionClauseSyntax: For properties and indexers, this node declares the getter method symbol whose IsImplicitlyDeclared flag is false and hence the analyzer symbol actions need to be invoked for this getter. 2.Previously executable code block actions for nodes within ArrowExpressionClauseSyntax were executed with parenting property symbol as the owning symbol. This change fixes it to have the declared getter method symbol as the owner of executable block for ArrowExpressionClauseSyntax. I have added IDE and compiler driver tests for symbol analyzer, syntax node analyzer and executable code block analyzer for expression bodied members.
This was referenced Feb 27, 2015
This was referenced Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix couple of issues in CSharpDeclarationComputer (issue #592):
I have added IDE and compiler driver tests for symbol analyzer, syntax node analyzer and executable code block analyzer for expression bodied members.
@JohnHamby @shyamnamboodiripad @srivatsn can you please review?