Open jishindev opened 1 year ago
Resurfacing. Would appreciate any sort of inputs, possible timelines or workarounds to solve for the above case.
did you try a lazy initializer and function ref to solve the self-reference? Not 100% sure you need the lazy, just the function might be enogh.
val validateComponent: Validation<Component> by lazy {
Component::subComponents onEach {
run(validateComponentRef())
}
}
private fun validateComponentRef(): Validation<Component> = validateComponent
Did not find anything related in the issues tab, so creating one to understand whats possible.
I have a set of data classes where one class references itself as a List. I'm unable to find a way to write a validator that can support this. Please share your thoughts on what can be done here.
Sample data classes -