@gildor I need inheritance, so, I can't use a data class.
This approach also means the super type parameters must always be declared in the subclasses. For example:
abstract class Super(val name: String)
class Child(name: String, val age: Int): Super(name)