mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +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)
|
if (!init)
|
||||||
return;
|
return;
|
||||||
|
if (init->type == ex_nil)
|
||||||
|
convert_nil (init, type);
|
||||||
if (!type_assignable (type, get_type (init))) {
|
if (!type_assignable (type, get_type (init))) {
|
||||||
error (init, "type mismatch in initializer");
|
error (init, "type mismatch in initializer");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue