On 20/3/25 16:47, Philippe Mathieu-Daudé wrote:
> Hi,
>
> object_class_dynamic_cast() checks whether a class implements
> a type name, and return the class casted appropriately. This
> also works with interfaces, except when an interface is
> implemented multiple times (by intermediate abstract parents /
> interfaces).
I had a chat with Pierrick where he said diamond graph often leads
to problems, so it is safer to not allow multiple inheritance that
way; and returning the casted class is simple enough.
I'll see how to do differently, effectively not pursuing this series.
>
> This series factors object_class_implements_type() out of
> object_class_dynamic_cast() and use it (at least the meaning
> seems clearer to me when reviewing).
>
> I could get it working with object_class_foreach() but for
> some reason fail at writing a proper test. Posting the last
> patch as RFC so we can discuss it on the list.
>
> Regards,
>
> Phil.