Reports anonymous object literals implementing a Java interface with a single abstract method that can be converted into a call with a lambda expression.

Example:


class SomeService {
  val threadPool = Executors.newCachedThreadPool()
    
  fun foo() {
    threadPool.submit(object : Runnable {
      override fun run() {
        println("hello")
      }
    })
  }
}

After the quick-fix is applied:


  fun foo() {
    threadPool.submit { println("hello") }
  }