https://kotlinlang.org logo
#arrow-contributors
Title
# arrow-contributors
n

Nathan Bedell

01/13/2022, 4:42 PM
Hi all. Just wanted to double check to see if this feature makes sense before I write up an issue or start working on a PR. Currently with the
@optics
annotation, on a
sealed class
it looks like only prisms for each of the sub-classes are generated. Wouldn't it also make sense to generate lenses for each of the abstract fields of the sealed class, at least if the necessary criteria is met (i.e. all subclasses use the abstract val in question as overridden constructor parameters)?
s

simon.vergauwen

01/13/2022, 6:23 PM
Hey @Nathan Bedell, Yes, that absolutely makes sense! This is really great functionality that has been missing.
👍 1
4 Views