Is it possible to specify a static function in a Kotlin interface?
Basically, nothing in a companion object can be abstract or open (and thus be overridden), and there’s no way to require the implementations’ companion objects to have a method or to define/require a constructor in an interface. A possible solution for you is to separate these two functions into two interfaces: interface Serializable<ToType> { fun … Read more