Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly handle expression variable declared within VariableDeclaratorSyntax.ArgumentList in field declarations. #13564

Merged
merged 2 commits into from
Sep 7, 2016

Conversation

AlekseyTs
Copy link
Contributor

Related to #12597 and # 13417.
Also fixes #13528.

@dotnet/roslyn-compiler, @gafter Please review.

@AlekseyTs
Copy link
Contributor Author

Ping @dotnet/roslyn-compiler, @gafter Please review.

@gafter
Copy link
Member

gafter commented Sep 7, 2016

:shipit:

@AlekseyTs
Copy link
Contributor Author

Ping @dotnet/roslyn-compiler Please review, need a second sign-off.

Assert.Null(model.GetDeclaredSymbol(variableDeclaratorSyntax));
Assert.Null(model.GetDeclaredSymbol((SyntaxNode)variableDeclaratorSyntax));

Assert.False(model.LookupSymbols(decl.SpanStart, name: decl.Identifier().ValueText).Any());
Copy link
Member

Choose a reason for hiding this comment

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

Consider extracting a local for decl.Identifier().ValueText.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, will include this change in the next PR.

@cston
Copy link
Member

cston commented Sep 7, 2016

LGTM

@AlekseyTs AlekseyTs merged commit 60e3e28 into dotnet:master Sep 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adjust wording for ERR_ExpressionVariableInConstructorOrFieldInitializer error
4 participants