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

Permit a trailing comma inside a switch expression #32292

Closed
gafter opened this issue Jan 9, 2019 · 5 comments
Closed

Permit a trailing comma inside a switch expression #32292

gafter opened this issue Jan 9, 2019 · 5 comments
Assignees
Milestone

Comments

@gafter
Copy link
Member

gafter commented Jan 9, 2019

Per LDM 2019-01-09 we have accepted the proposal in dotnet/csharplang#2098 to allow a trailing comma inside a switch expression

_ = e switch
    {
        1 => 2,
        3 => 4, // comma now allowed here
    }

Similarly, we have accepted a proposal to allow a trailing comma inside a property subpattern.

_ = e is T
    {
        X: 2,
        Y: 3, // comma now allowed here
    };

This needs to be implemented.

@gafter gafter added this to the 16.0.P2 milestone Jan 9, 2019
@gafter gafter self-assigned this Jan 9, 2019
@CyrusNajmabadi
Copy link
Member

Thanks!

@alrz
Copy link
Member

alrz commented Jan 9, 2019

what about property patterns?

@gafter
Copy link
Member Author

gafter commented Jan 10, 2019

@gafter
Copy link
Member Author

gafter commented Jan 10, 2019

@alrz Yes, inside property patterns too (approved yesterday).

@CyrusNajmabadi
Copy link
Member

Awesome!

gafter added a commit to gafter/roslyn that referenced this issue Jan 14, 2019
- Permit a trailing comma after the last arm of a switch expression
- Permit a trailing comma after the last subpattern of a property pattern clause
Fixes dotnet#32292
@gafter gafter modified the milestones: 16.0.P2, 16.0.P3 Jan 16, 2019
gafter pushed a commit that referenced this issue Jan 18, 2019
* Rename "deconstruct pattern" to "positional pattern" in the APIs.
Fixes #32291

* Permit a trailing commas in two places
- Permit a trailing comma after the last arm of a switch expression
- Permit a trailing comma after the last subpattern of a property pattern clause
Fixes #32292
xoofx pushed a commit to stark-lang/stark-roslyn that referenced this issue Apr 16, 2019
* Rename "deconstruct pattern" to "positional pattern" in the APIs.
Fixes dotnet#32291

* Permit a trailing commas in two places
- Permit a trailing comma after the last arm of a switch expression
- Permit a trailing comma after the last subpattern of a property pattern clause
Fixes dotnet#32292
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