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

Nested Initializers should break #487

Closed
belav opened this issue Nov 21, 2021 · 0 comments · Fixed by #488
Closed

Nested Initializers should break #487

belav opened this issue Nov 21, 2021 · 0 comments · Fixed by #488
Assignees
Milestone

Comments

@belav
Copy link
Owner

belav commented Nov 21, 2021

var nestedInitializer = new Thing { One = 1, Two = new Thing { One = 1 } };
// should be
var nestedInitializer = new Thing
{
    One = 1,
    Two = new Thing { One = 1 }
};

var nestedInitializer = new List<Thing>() { new Thing() { One = 1 }, new() { One = 1 } };
// should be
var nestedInitializer = new List<Thing>()
{
    new Thing() { One = 1 },
    new() { One = 1 }
};
@belav belav added this to the 0.12.0 milestone Nov 21, 2021
@belav belav self-assigned this Nov 21, 2021
belav added a commit that referenced this issue Nov 21, 2021
belav added a commit that referenced this issue Nov 30, 2021
* Break nested initializers

closes #487

* Only break if more than one expression in either initializer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant