Create type_nil for passing nil into ...

This commit is contained in:
Bill Currie 2011-01-22 16:41:31 +09:00
parent 4ac80c2932
commit dea6771d92
2 changed files with 3 additions and 1 deletions

View file

@ -88,6 +88,8 @@ extern type_t type_quaternion;
extern type_t type_integer;
extern type_t type_short;
extern type_t *type_nil; // for passing nil into ...
extern type_t type_id;
extern type_t type_Class;
extern type_t type_Protocol;

View file

@ -1565,7 +1565,7 @@ build_function_call (expr_t *fexpr, type_t *ftype, expr_t *params)
t = ftype->t.func.param_types[i];
} else {
if (e->type == ex_nil)
convert_nil (e, t = &type_vector); //FIXME largest param size
convert_nil (e, t = type_nil);
if (e->type == ex_bool)
convert_from_bool (e, get_type (e));
if (is_integer_val (e)