add the type of whatever is 'not a function' to that error message

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-08-18 12:45:51 +02:00
parent a74b26a9bc
commit 7ecd9714b0

View file

@ -921,7 +921,7 @@ static bool parser_close_call(parser_t *parser, shunt *sy)
sy->out[fid] = syexp(call->expression.node.context, (ast_expression*)call);
if (fun->expression.vtype != TYPE_FUNCTION) {
parseerror(parser, "not a function");
parseerror(parser, "not a function (%s)", type_name[fun->expression.vtype]);
return false;
}