This situation looks like a bug to me, but I’m new with Kotlin and really can’t tell.
I’m getting the following error:
Object ImportantConfigClass captures the script class instance. Try to use class or anonymous object instead
object ImportantConfigClass {
init {
DataClass().propExtension
}
}
data class DataClass (
val paused: Boolean = false
)
val DataClass.propExtension: Boolean
get() {
return this.paused
}
What does it mean that it captures the script class instance, and why does that happen?