mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
allow returning NIL
This commit is contained in:
parent
bc44f950af
commit
70bedc149f
1 changed files with 4 additions and 0 deletions
|
@ -1269,6 +1269,10 @@ return_expr (function_t *f, expr_t *e)
|
|||
e->e.float_val = e->e.integer_val;
|
||||
t = &type_float;
|
||||
}
|
||||
if (t == &type_void) {
|
||||
t = f->def->type->aux_type;
|
||||
e->type = expr_types[t->type];
|
||||
}
|
||||
if (f->def->type->aux_type != t)
|
||||
return error (e, "type mismatch for return value of %s",
|
||||
f->def->name);
|
||||
|
|
Loading…
Reference in a new issue