more eval tests and fix eval call analyze code

This commit is contained in:
Andrew Kelley
2016-04-12 17:33:46 -07:00
parent 69109bc270
commit 3c27cb2527
4 changed files with 77 additions and 15 deletions

View File

@@ -713,7 +713,9 @@ static bool eval_fn_call_expr(EvalFn *ef, AstNode *node, ConstExprValue *out_val
}
if (!fn_table_entry) {
zig_panic("TODO");
ConstExprValue fn_val = {0};
if (eval_expr(ef, fn_ref_expr, &fn_val)) return true;
fn_table_entry = fn_val.data.x_fn;
}
int param_count = node->data.fn_call_expr.params.length;