Add an error output in the ast where I missed one (there are probably more places which need one)

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-08-18 12:45:29 +02:00
parent 39f37262db
commit a74b26a9bc

6
ast.c
View file

@ -1145,8 +1145,12 @@ bool ast_entfield_codegen(ast_entfield *self, ast_function *func, bool lvalue, i
*out = ir_block_create_load_from_ent(func->curblock, ast_function_label(func, "efv"),
ent, field, self->expression.vtype);
}
if (!*out)
if (!*out) {
asterror(ast_ctx(self), "failed to create %s instruction (output type %s)",
(lvalue ? "ADDRESS" : "FIELD"),
type_name[self->expression.vtype]);
return false;
}
if (lvalue)
self->expression.outl = *out;