Inspectopedia Help

'lateinit var' property overrides 'lateinit var' property

Reports lateinit var properties that override other lateinit var properties.

A subclass instance will have two fields for a single property, and the one from the superclass will remain effectively unused.


open class BaseClass { open lateinit var name: String } class RealClass : BaseClass() { override lateinit var name: String }

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3


Kotlin, @snapshot@

Last modified: 13 July 2023