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 function literal should not be forced to be multiline #2106

Closed
paul-dingemans opened this issue Jul 3, 2023 · 0 comments · Fixed by #2107
Closed

Nested function literal should not be forced to be multiline #2106

paul-dingemans opened this issue Jul 3, 2023 · 0 comments · Fixed by #2107
Assignees
Milestone

Comments

@paul-dingemans
Copy link
Collaborator

paul-dingemans commented Jul 3, 2023

As reported on chat the code below:

supportingText = supportingText?.let {
  { Text(supportingText) }
},

is now formatted as:

supportingText = supportingText?.let {
  {
    Text(supportingText)
  }
}

This a bug introduced in ktlint 0.50.0. The code should not be reformatted.

@paul-dingemans paul-dingemans added this to the 0.50.1 milestone Jul 3, 2023
@paul-dingemans paul-dingemans self-assigned this Jul 3, 2023
paul-dingemans added a commit that referenced this issue Jul 3, 2023
paul-dingemans added a commit that referenced this issue Jul 9, 2023
* Fix incorrect formatting of nested function literal

Closes #2106
Closes #2103
@paul-dingemans paul-dingemans modified the milestones: 0.50.1, 1.0 (Yeah!) Jul 13, 2023
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.

1 participant