enable passing NIL into a function

This commit is contained in:
Bill Currie 2001-10-25 20:51:56 +00:00
parent f8a41cb1bc
commit bc44f950af

View file

@ -1200,6 +1200,10 @@ function_expr (expr_t *e1, expr_t *e2)
t = &type_float; t = &type_float;
} }
if (ftype->num_parms != -1) { if (ftype->num_parms != -1) {
if (t == &type_void) {
t = ftype->parm_types[i - 1];
e->type = expr_types[t->type];
}
if (t != ftype->parm_types[i - 1]) if (t != ftype->parm_types[i - 1])
err = error (e, "type mismatch for parameter %d of %s", err = error (e, "type mismatch for parameter %d of %s",
i, e1->e.def->name); i, e1->e.def->name);