Storing realm objects using Kotlin extensions
Please correct me if I got you wrong, but we're talking here about simple inheritance:  

open class RealmObject {

    fun store() { /*RealmObject impl*/ } 

}

open class Player : RealmObject() {

    override fun store() { 
     /*Player impl*/ 
     super.store() /*RealmObject impl*/

   }
    ...
}


Your wanted behaviour fits:

Player().store() // executes override function - Player impl, then RealmObject impl
RealmObject().store() // executes RealmObject implementation




If you want to keep it as extension functions, your code is valid, but isn't really an eye-candy.

Both classes Player and RealmObject would have the same function store(), but they are 'unrelated' - thats why we don't see any override. Extension functions extend statically and they can shadow your implementation, which makes your code very hard to read and the behaviour becomes at some point not understandable.

Please use extension functions wisely and try to never use it for inheritance.