Inlining sub class of function


#1

Is is possible to create a function that has a type and to be able to inline it ?
Say like :

class TaggedFunction(val f:()->Int) : ()->Int by f {}
inline fun test(t:TaggedFunction) :Int = t()


#2

No, this is not possible. What you’re trying to implement is a type alias, which is going to be supported in Kotlin after the 1.0 release.