-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Track whether or not a use of a range variable is a capture. #1501
Conversation
@jaredpar @VSadov @AlekseyTs @agocke @VladimirReshetnikov Could a couple of you review this please? Note that the "related" VB issue #1312 will be done next, separately. |
@@ -334,20 +334,25 @@ protected void Analyze(ref bool badRegion, DiagnosticBag diagnostics) | |||
} | |||
} | |||
|
|||
private void CheckCaptured(Symbol variable) | |||
private void CheckCaptured(Symbol variable, Symbol underlyingVariable = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a comment what is the underlyingVariable and when it should be passed in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, can we use more specific type for it?
I've updated the PR as we had discussed. Please review. |
LGTM |
Track whether or not a use of a range variable is a capture. Fixes #1291
Fixes #1291