DelayedInit or OnCreate, any solution?

Which one of this use cases cannot be implemented with kotlin receiver function?

I can imagine the only one use case where we want to define class extension and apply function in one context:

  class A extend B{
      ovveride def someFunc():Unit = ???
      sumFunc()
  }

instead of

  class A extend B{
      ovveride def someFunc():Unit = ???
      ovveride def apply():Unit = {
          sumFunc()
      }
  }

It seems it is impossible without DeleyedInit.
So it should not be depreciated :slight_smile:

Or may be we need some syntax changes, for example:

object TestApp extend Application do {
  doSomething
}

which will be sugaring to

object TestApp extend Application{
   ovveride def apply(){
      doSomething
   }
}