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

Test/fix scoping of pattern variables in expression-bodied functions and properties. #9265

Merged
merged 1 commit into from
Feb 28, 2016

Conversation

AlekseyTs
Copy link
Contributor

Fixes #8810.
Related to #8816.

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

@@ -215,11 +221,16 @@ private Binder GetEnclosingBinder(CSharpSyntaxNode node, int position)
binder = RootBinder.GetBinder(current);
}
}
else if (current.Kind() == SyntaxKind.ArrowExpressionClause && current.Parent?.Kind() == SyntaxKind.LocalFunctionStatement)
Copy link
Member

Choose a reason for hiding this comment

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

Nit: It looks like this block and the one above it could be combined.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it will make code easier to understand. In fact, I believe it will make it much harder to understand.

@agocke
Copy link
Member

agocke commented Feb 27, 2016

👍

@AlekseyTs
Copy link
Contributor Author

Test prtest/mac/dbg/unit32 please.

AlekseyTs added a commit that referenced this pull request Feb 28, 2016
Test/fix scoping of pattern variables in expression-bodied functions and properties.
@AlekseyTs AlekseyTs merged commit 5794403 into dotnet:features/patterns Feb 28, 2016
@gafter
Copy link
Member

gafter commented Feb 28, 2016

LGTM

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.

4 participants