Is there a hack to have reified functions in Inte...
# arrow
i
Is there a hack to have reified functions in Interfaces?
s
Only possible to define
inline
functions for interfaces as extension functions for said interface.
Only really word it if you really need
reified
otherwise it’s probably not worth it.
Since you cannot override the extension function for an instance
i
Thanks @simon.vergauwen I wish we can change that in
Arrow-Meta
😂
s
That’s is not possible because you cannot inline what you don’t know what it is yet.
You can make implementation override inline iirc tho
p
Copy code
interface Bla {
  fun bla(f: KClass<*>)
}
classic style
you can add a type boundary instead of * if you need it
i
Thanks @pakoito 🙂