Allow assignments between any field types.

This commit is contained in:
Bill Currie 2011-03-30 08:14:17 +09:00
parent 75c3653be4
commit 550fff5467

View file

@ -699,6 +699,9 @@ type_assignable (type_t *dst, type_t *src)
// same type // same type
if (dst == src) if (dst == src)
return 1; return 1;
// any field = any field
if (dst->type == ev_field && src->type == ev_field)
return 1;
// id = any class pointer // id = any class pointer
if (dst == &type_id && src->type == ev_pointer if (dst == &type_id && src->type == ev_pointer
&& is_class (src->t.fldptr.type)) && is_class (src->t.fldptr.type))