ktfmt
ktfmt copied to clipboard
Short implementations of functional interfaces could be on a single line
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 }
I think this is the same as https://github.com/facebookincubator/ktfmt/issues/252. cc @strulovich
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 }