Back to Intellij Community

KotlinRedundantOverride

plugins/kotlin/code-insight/descriptions/resources-en/inspectionDescriptions/KotlinRedundantOverride.html

2025.3-rc-2410 B
Original Source

Reports redundant overriding declarations.

An override can be omitted if it does not modify the inherited signature semantics, for example, by changing visibility.

Example:

open class Foo {
      open fun singleExpression() {
      }
  }

  class Bar : Foo() {
      override fun singleExpression() = super.singleExpression()
  }

After the quick-fix is applied:

class Bar : Foo() {
  }