Inspectopedia Help

Redundant 'Companion' reference

Reports redundant Companion reference.

Example:

class A { companion object { fun create() = A() } } fun test() { val s = A.Companion.create() }

After the quick-fix is applied:

class A { companion object { fun create() = A() } } fun test() { val s = A.create() }

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Kotlin, @snapshot@

Last modified: 13 July 2023