The introduced feature of PR #874 fails for empty sealed types like the following:
@Lenses
sealed interface Field {
// no common property defined here
companion object
}
@Lenses
data class Birthday(
val date: LocalDate
) : Field {
companion object
}
@Lenses
data class Phone(
val number: String
) : Field {
companion object
}
This should definitely create those lenses even if this hierarchy shares no common property!
Also the check is ignored, that every child class must be annotated with Lenses. This should fail compiling:
@Lenses
sealed interface Field {
companion object
}
@Lenses
data class Birthday(
val date: LocalDate
) : Field {
companion object
}
// no annotation -> processor should fail with error!
data class Phone(
val number: String
) : Field {
companion object
}
Should also work if the common properties are marked with @NoLens of course!
@Lenses
sealed interface Field {
@NoLens
val ignored: Int
// no common property defined here
companion object
}
The introduced feature of PR #874 fails for empty
sealed
types like the following:This should definitely create those lenses even if this hierarchy shares no common property!
Also the check is ignored, that every child class must be annotated with
Lenses
. This should fail compiling:Should also work if the common properties are marked with
@NoLens
of course!