Closed jl5000 closed 1 year ago
I agree. This has been a too narrow restriction for abstract classes. Almost surely a patch would be welcome.
This looks like a fairly subtle bug — I think it's because constructors normally call validate()
with recursive = FALSE
because you expect the parent constructor to have done any validation it needs, but obviously we don't use the parent constructor when it is abstract. So I suspect we need a tweak to https://github.com/RConsortium/S7/blob/main/R/class.R#L261
Even though you cannot create abstract classes, it's still very convenient to define validators within them to save having to define them for every child class.
Created on 2023-08-29 with reprex v2.0.2