Hi folks! There is anyway to enforce type using ge...
# announcements
s
Hi folks! There is anyway to enforce type using generic? I'm using KPropertyT, V and I want to have a function that receives the
V
type only from the KProperty.
j
I think you are just missing specifying the type of
V
in that function,
Copy code
fun <T: Something, V: SomethingElse> KProperty<T, V>.test(value: V)
or something similiar, not 100% sure though, I’m newish myself
s
I want to value: V exacly what KProperty<*, V> is
I want to know if there is anyway to make the compiler enforce me to use the second generic type from KProperty in my value.
Could find this way