Hi there I have gone thru the kotlin documentation and haven't found anything. What I want to do is have a generic thar must be a data class, something like
data class MyData(val pop1:Long,val pop2:String,...)
fun class MyGenericClass<T : isDataClass>(o : T){
// This is the important part
fun useCopy(value : Long) = t.copy(pop1 = value)
}
What I really need to achieve is to be able to use the copy function of data classes in a generic way(pop1 will always be a member of my data classes)
Thanks in advance