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

Formatting for indexer parameters should mostly be the same as for method parameters. #1255

Closed
Meowtimer opened this issue May 8, 2024 · 0 comments · Fixed by #1278
Closed
Milestone

Comments

@Meowtimer
Copy link

Input:

public class Obj
{

    public string this[
        [A] int X,
        [B, VeryLongAttributeWithSoManyArguments(123, 321)] int Y,
        [C, LongAttributeThatIsLong] int Y
    ] => X + Y + Z;
    
    public string Method(
        [A] int X,
        [B, VeryLongAttributeWithSoManyArguments(123, 321)] int Y,
        [C, LongAttributeThatIsLong] int Y
    ) => X + Y + Z;    

}

Output:

public class Obj
{
    public string this[[A] int X, [B, VeryLongAttributeWithSoManyArguments(123, 321)] int Y, [
        C,
        LongAttributeThatIsLong
    ]
        int Y] => X + Y + Z;

    public string Method(
        [A] int X,
        [B, VeryLongAttributeWithSoManyArguments(123, 321)] int Y,
        [C, LongAttributeThatIsLong] int Y
    ) => X + Y + Z;
}

Expected behavior:
Both indexer and Method being formatted similarly with multiple lines for parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants