Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Wrap annotated type projections in type argument list #1909

Closed
paul-dingemans opened this issue Apr 2, 2023 · 0 comments · Fixed by #1910
Closed

Wrap annotated type projections in type argument list #1909

paul-dingemans opened this issue Apr 2, 2023 · 0 comments · Fixed by #1910
Milestone

Comments

@paul-dingemans
Copy link
Collaborator

As part of #642 annotated type projections in an type argument list were also allowed to be on the same line as the type. For type projections the normal annotation wrapping rules should be applied. The readability aspect which holds true for function parameters is of no importance in this situation.

val fooBar: FooBar<String, @Foo String, @Foo @Bar String, @Bar("bar") @Foo String> = FooBar()

should be formatted as:

val fooBar: FooBar<
    String,
    @Foo String,
    @Foo @Bar
    String,
    @Bar("bar")
    @Foo
    String
    > = FooBar()
@paul-dingemans paul-dingemans added this to the 0.49.0 milestone Apr 2, 2023
paul-dingemans added a commit that referenced this issue Apr 2, 2023
…ktlint_official` only

Closes #1908

Wrap annotated projection types in type argument lists to a separate line `annotation`

Closes #1909
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant