arrow-optics icon indicating copy to clipboard operation
arrow-optics copied to clipboard

["Request"] Generic Type parameter support for optics

Open Legion2 opened this issue 3 years ago • 0 comments

What version are you currently using? 0.10.5 with kotlin 1.3.72 because I can not upgrade to kotlin 1.4 jet

What would you like to see?

@optics
data class Resource<T>(
        val name: String,
        val data: T,
        val metadata: Metadata = Metadata()
) {
    companion object
}

This should not produce compiler errors. I don't need optics in the data property of type T but in the metadata property which is not a generic type.

Legion2 avatar Nov 19 '20 09:11 Legion2