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
1 changed files with 3 additions and 0 deletions

View File

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