Handle invalid initializers gracefully.

This commit is contained in:
Bill Currie 2011-02-14 15:45:31 +09:00
parent 4c63a0bad6
commit 23b01be214

View file

@ -233,6 +233,9 @@ initialize_def (symbol_t *sym, type_t *type, expr_t *init, defspace_t *space,
}
if (!init)
return;
convert_name (init);
if (init->type == ex_error)
return;
if (init->type == ex_nil)
convert_nil (init, type);
if (!type_assignable (type, get_type (init))) {