Fix assignment of id to class pointers.

This commit is contained in:
Bill Currie 2011-02-08 17:12:01 +09:00
parent 6643c5dd98
commit faab931ffc

View file

@ -832,6 +832,10 @@ type_assignable (type_t *dst, type_t *src)
if (dst == &type_id && src->type == ev_pointer
&& is_class (src->t.fldptr.type))
return 1;
// any class pointer = id
if (src == &type_id && dst->type == ev_pointer
&& is_class (dst->t.fldptr.type))
return 1;
// pointer = array
if (dst->type == ev_pointer
&& src->type == ev_invalid && src->ty == ty_array) {