mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Support nil in initializers.
This commit is contained in:
parent
1f8b453d58
commit
c3a991e555
1 changed files with 2 additions and 0 deletions
|
@ -215,6 +215,8 @@ initialize_def (symbol_t *sym, type_t *type, expr_t *init, defspace_t *space,
|
|||
}
|
||||
if (!init)
|
||||
return;
|
||||
if (init->type == ex_nil)
|
||||
convert_nil (init, type);
|
||||
if (!type_assignable (type, get_type (init))) {
|
||||
error (init, "type mismatch in initializer");
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue