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

Unneeded split on method call after split record literal #1213

Closed
munificent opened this issue May 1, 2023 · 0 comments · Fixed by #1218
Closed

Unneeded split on method call after split record literal #1213

munificent opened this issue May 1, 2023 · 0 comments · Fixed by #1218

Comments

@munificent
Copy link
Member

munificent commented May 1, 2023

When a record literal that is a target of a member splits, it forces the member to split too. This leads to some weird output:

main() {
  final a = (
    element,
    element,
  )
      .getter; // <- Bad.

  final b = [
    element,
    element,
  ].getter;
}

Note how the list literal keeps .getter on the same line.

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