add an asterror message for ast_entfield_new with a wrong type

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-12 22:33:34 +01:00
parent 89d86420ad
commit 0224de02d5

1
ast.c
View file

@ -488,6 +488,7 @@ ast_entfield* ast_entfield_new(lex_ctx ctx, ast_expression *entity, ast_expressi
ast_instantiate(ast_entfield, ctx, ast_entfield_delete);
if (field->expression.vtype != TYPE_FIELD) {
asterror(ctx, "ast_entfield_new with expression not of type field");
mem_d(self);
return NULL;
}