A nice internal error

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-23 22:15:17 +01:00
parent 2bc99076cf
commit 5897f0439c

4
ast.c
View file

@ -892,6 +892,10 @@ ast_function* ast_function_new(lex_ctx ctx, const char *name, ast_value *vtype)
vtype->isconst || vtype->isconst ||
vtype->expression.vtype != TYPE_FUNCTION) vtype->expression.vtype != TYPE_FUNCTION)
{ {
asterror(ast_ctx(self), "internal error: ast_function_new condition %i %i type=%i",
(int)!vtype,
(int)vtype->isconst,
vtype->expression.vtype);
mem_d(self); mem_d(self);
return NULL; return NULL;
} }