When compositing objects, we were checking that class_of(B) is in A's
inheritance tree before allowing attaching B as a composite object of A.
This is wrong and breaks a few cases, for example: B extends a class that
is in A's inheritance tree or B implements an interface that is in A's
inheritance tree.
Thanks to Marcel for reporting.
EO_OBJ_POINTER_RETURN_VAL(comp_obj_id, comp_obj, EINA_FALSE);
EO_OBJ_POINTER_RETURN_VAL(parent_id, parent, EINA_FALSE);
- if (!eo_isa(parent_id, _eo_class_id_get(comp_obj->klass)))
- {
- return EINA_FALSE;
- }
-
Eo_Base_Data *comp_pd = eo_data_scope_get(comp_obj_id, EO_BASE_CLASS);
/* Don't composite if we already have a composite object of this type */
{
fail_if(!eo_composite_part_is(simple));
fail_if(eo_composite_attach(obj, simple));
- fail_if(eo_composite_attach(simple, obj));
-
eo_unref(simple);
eo_unref(obj);