is it possible to make an extension function like ...
# getting-started
z
is it possible to make an extension function like this where I can have the class being extended and the return type as type params T, and V
val String.foo: Bar by someMethod()
e
no. property delegate is stored in a hidden field and extensions can't add fields
this might be close
Copy code
inline fun <reified T, reified V> T.someMethod(): V = TODO()

val String.foo: Bar
    get() = someMethod<String, Bar>()
z
that's a little disappointing to hear but I guess it'll be fine like that