Jul 30, 2017 · 1 min read
The issue you describe is nasty, and can also happen in other languages (like Java). It comes from the fact that accessing overrideable methods or properties inside a constructor can cause problems if subclasses override these and haven’t fully initialized themself at the time the base class accesses them.
I assume the base class called `setProgress()` inside its constructor?
The Kotlin plugin for IntelliJ has a nice inspection that warns you, in case the constructor of an open class accesses a non-final method.
Thanks for your article, Keep coding!