Inspectopedia Help

Constructor can never be complete

Reports constructors with a non-null self-reference parameter.

Such constructors never instantiate a class.

The quick-fix converts the parameter type to nullable.

Example:

class SelfRef(val ref: SelfRef)

After the quick-fix is applied:

class SelfRef(val ref: SelfRef?)

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Kotlin, @snapshot@

Last modified: 13 July 2023