Expected Behavior of the rule
This gets flagged by OptionalUnit:
interface Foo {
fun onMapClicked(point: Point?) = Unit
}
Right now though that use of Unit isn't reported.
Context
This could instead be written as:
interface Foo {
fun onMapClicked(point: Point?) {}
}
The use of Unit in the first example is therefore optional and should be reported. This means reverting the logic introduced in #1176.
Expected Behavior of the rule
This gets flagged by OptionalUnit:
Right now though that use of Unit isn't reported.
Context
This could instead be written as:
The use of Unit in the first example is therefore optional and should be reported. This means reverting the logic introduced in #1176.