Kotlin: Ordem de inicialização da classe derivada
Kotlin: Ordem de inicialização da classe derivada
Achei muito interessante esse tópico na documentação da linguagem, onde diz sobre a ordem de execução na instância dos objetos da classe, com seus construtores base.
https://kotlinlang.org/docs/reference/classes.html#derived-class-initialization-order
During the construction of a new instance of a derived class, the base class initialization is done as the first step (preceded only by evaluation of the arguments for the base class constructor) and thus happens before the initialization logic of the derived class is run.
Gerando o seguinte resultado: