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

Short implementations of functional interfaces could be on a single line #253

Open
bethcutler opened this issue Oct 13, 2021 · 2 comments
Open
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@bethcutler
Copy link
Contributor

Actual:

fun interface VeryVeryLongCustomInterface {
  fun function(options: Options): EndResult
}

val EMPTY_VERY_VERY_LONG_CUSTOM_INTERFACE: VeryVeryLongCustomInterface =
    VeryVeryLongCustomInterface {
  EndResult
}

Preferable, perhaps?

val EMPTY_VERY_VERY_LONG_CUSTOM_INTERFACE: VeryVeryLongCustomInterface =
    VeryVeryLongCustomInterface { EndResult }
@cgrushko
Copy link
Contributor

I think this is the same as #252.
cc @strulovich

@hick209 hick209 added enhancement New feature or request good first issue Good for newcomers labels Jun 5, 2024
@hick209
Copy link
Contributor

hick209 commented Jun 5, 2024

BTW this happens because of the line break. If there were no line breaks it would be placed on a single line

val EMPTY: VeryVeryLongCustomInterface = VeryVeryLongCustomInterface { EndResult }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants