Skip to content

Fix couple of analyzer driver issues for C# expression bodied member nodes - #911

Merged
mavasani merged 2 commits into
dotnet:masterfrom
mavasani:Issue592
Feb 27, 2015
Merged

Fix couple of analyzer driver issues for C# expression bodied member nodes#911
mavasani merged 2 commits into
dotnet:masterfrom
mavasani:Issue592

Conversation

@mavasani

Copy link
Copy Markdown
Contributor

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.

@JohnHamby @shyamnamboodiripad @srivatsn can you please review?

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.
@tmeschter

Copy link
Copy Markdown
Contributor

👍

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@msJohnHamby

Copy link
Copy Markdown
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.
@mavasani
mavasani merged commit 9c97fcf into dotnet:master Feb 27, 2015
@mavasani
mavasani deleted the Issue592 branch February 27, 2015 00:19
dibarbet pushed a commit that referenced this pull request Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants