Fix the checking for assignments between id and Class.

With Class now being struct obj_class rather than an actual class or
object, checking for Class now needs to be explicit.
This commit is contained in:
Bill Currie 2012-11-11 17:23:56 +09:00
parent 694b268f53
commit ee28f3869c
1 changed files with 2 additions and 2 deletions

View File

@ -715,11 +715,11 @@ type_assignable (type_t *dst, type_t *src)
return 1;
// id = any class pointer
if (dst == &type_id && src->type == ev_pointer
&& is_class (src->t.fldptr.type))
&& (is_class (src->t.fldptr.type) || src == &type_Class))
return 1;
// any class pointer = id
if (src == &type_id && dst->type == ev_pointer
&& is_class (dst->t.fldptr.type))
&& (is_class (dst->t.fldptr.type) || dst == &type_Class))
return 1;
// pointer = array
if (dst->type == ev_pointer