KT.OBJECT_LITERAL_TO_LAMBDA
Anonymous object with implementation of a single method
An anonymous object that does nothing other than the implementation of a single method can be used as a lambda. See https://kotlinlang.org/docs/java-interop.html#sam-conversions See https://kotlinlang.org/docs/fun-interfaces.html
Noncompliant Code
Copy
object : Foo {
override fun bar() {
}
}
Compliant Code
Copy
Foo {
}