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

Allow parsing deconstruction-declaration as expression #15049

Closed
jcouv opened this issue Nov 7, 2016 · 8 comments
Closed

Allow parsing deconstruction-declaration as expression #15049

jcouv opened this issue Nov 7, 2016 · 8 comments

Comments

@jcouv
Copy link
Member

jcouv commented Nov 7, 2016

For instance, var x = ((var y, var z) = e).Item1;

@jcouv
Copy link
Member Author

jcouv commented Nov 8, 2016

Within 2.0, we need to at least do some disambiguation in the parser. The rest of the feature can be post-2.0.

@jcouv
Copy link
Member Author

jcouv commented Nov 8, 2016

In particular, this means that deconstruction declaration can be used in embedded statement.
For instance:

if (flag)
    var (x, y) = e;

@gafter
Copy link
Member

gafter commented Nov 17, 2016

A proposed plan of attack, from the language design POV, is here: https://gist.github.com/gafter/36265536f98b7dfd58fdc1d86ec5aecb

@gafter
Copy link
Member

gafter commented Nov 17, 2016

@MadsTorgersen and I came up with a way to prevent this from being a breaking change. I’ll revise the proposal shortly.

@gafter
Copy link
Member

gafter commented Dec 2, 2016

The compiler implementation is mostly done in #15548; the next step would be to delete the 30 lines that produce the diagnostic and add testing. When we schedule this work is to be decided by @jaredpar.

@gafter gafter modified the milestones: 2.0 (RC.3), 2.0 (RTM) Dec 2, 2016
@gafter gafter removed their assignment Dec 2, 2016
@jcouv jcouv modified the milestones: 2.1, 2.0 (RTM) Jan 5, 2017
@jcouv
Copy link
Member Author

jcouv commented Jan 5, 2017

Moved to 2.1.
Relates to support for deconstructions mixing assignments and declarations (#15050).

@jaredpar jaredpar modified the milestones: 15.3, 15.1 Mar 9, 2017
@jaredpar
Copy link
Member

@gafter is this important for 15.3 or can we push off to 15.6?

@gafter
Copy link
Member

gafter commented May 20, 2017

This is the implementation side of a language feature (dotnet/csharplang#125) that is not in 7.1. So it should be pushed off, or even closed until we start work on the feature.

@gafter gafter closed this as completed May 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants