Reports lambda expressions that are neither invoked nor assigned.

A lambda expression that is neither invoked nor assigned to a variable has no effect on program execution and is likely unintentional.

예:


  fun foo() {
    {} // Warning: Lambda expression is never invoked
  }

빠른 수정 적용 후:


  fun foo() {
    run {} // Lambda is now invoked via the 'run' function
  }