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

Invalid blank line being added with lambda returning collection expression #1306

Closed
ShawnTheBeachy opened this issue Jul 24, 2024 · 0 comments · Fixed by #1310
Closed

Invalid blank line being added with lambda returning collection expression #1306

ShawnTheBeachy opened this issue Jul 24, 2024 · 0 comments · Fixed by #1310
Labels
area:formatting type:bug Something isn't working
Milestone

Comments

@ShawnTheBeachy
Copy link
Contributor

Input:

public sealed class Demo
{
    private void Foo()
    {
        var sub = Substitute.For<IFoo>();
        sub.Bar()
            .Returns(_ =>
                [
                    Guid.Parse("90a34545-5030-4251-8e5b-355c2d1e322e"),
                    Guid.Parse("30c0932b-4563-4a46-8577-3c285addfa69")
                ]
            );
    }

    private interface IFoo
    {
        IReadOnlyList<Guid> Bar();
    }
}

Output:

public sealed class Demo
{
    private void Foo()
    {
        var sub = Substitute.For<IFoo>();
        sub.Bar()
            .Returns(_ =>

                [
                    Guid.Parse("90a34545-5030-4251-8e5b-355c2d1e322e"),
                    Guid.Parse("30c0932b-4563-4a46-8577-3c285addfa69")
                ]
            );
    }

    private interface IFoo
    {
        IReadOnlyList<Guid> Bar();
    }
}

Expected behavior:
The blank line on line 8 should not be there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:formatting type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants