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

Edit-and-continue needs to be disabled for foreach loops that contain out vars #12736

Closed
gafter opened this issue Jul 26, 2016 · 2 comments
Closed
Assignees
Labels
Area-Compilers Bug Feature - Out Variable Declaration Out Variable Declaration Feature - Pattern Matching Pattern Matching Interactive-EnC Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented
Milestone

Comments

@gafter
Copy link
Member

gafter commented Jul 26, 2016

See also #1503, #12688
/cc @tmat @jaredpar

Because out vars and patterns can introduce variables in the expression of a foreach loop, but the declaration of the foreach loop is not represented as a node, the current approach to edit-and-continue will break if a foreach loop contains either out variables or pattern-matching in the expression. We will either need to disable edit-and-continue somehow, or begin parsing the foreach loop into a new node form that contains a syntax node for the variable declaration. The latter is proposed in #12688.

/cc @CyrusNajmabadi @jcouv @VSadov

@AdamSpeight2008
Copy link
Contributor

Or make it an error in those cases.

@gafter gafter assigned jaredpar and unassigned gafter Aug 31, 2016
@jaredpar jaredpar modified the milestones: 2.0 (RC), 2.0 (Preview 5) Sep 9, 2016
@jaredpar jaredpar assigned jcouv and unassigned jaredpar Sep 9, 2016
@jcouv
Copy link
Member

jcouv commented Sep 13, 2016

With PR #13754, edits are disallowed in an active method that has any out var.

@jcouv jcouv added 4 - In Review A fix for the issue is submitted for review. Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented and removed 3 - Working 4 - In Review A fix for the issue is submitted for review. labels Sep 13, 2016
@jcouv jcouv closed this as completed Sep 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Bug Feature - Out Variable Declaration Out Variable Declaration Feature - Pattern Matching Pattern Matching Interactive-EnC Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented
Projects
None yet
Development

No branches or pull requests

4 participants