enum init uses container init syntax instead of fn call

See #5
This commit is contained in:
Andrew Kelley
2016-04-19 18:52:09 -07:00
parent 7a7f83033c
commit 36c6acfc76
5 changed files with 69 additions and 50 deletions

View File

@@ -320,6 +320,11 @@ static bool eval_container_init_expr(EvalFn *ef, AstNode *node, ConstExprValue *
AstNodeContainerInitExpr *container_init_expr = &node->data.container_init_expr;
ContainerInitKind kind = container_init_expr->kind;
if (container_init_expr->enum_type) {
zig_panic("TODO");
}
TypeTableEntry *container_type = resolve_expr_type(container_init_expr->type);
out_val->ok = true;
@@ -723,10 +728,6 @@ static bool eval_fn_call_expr(EvalFn *ef, AstNode *node, ConstExprValue *out_val
return false;
}
if (node->data.fn_call_expr.enum_type) {
zig_panic("TODO");
}
FnTableEntry *fn_table_entry = node->data.fn_call_expr.fn_entry;
if (fn_ref_expr->type == NodeTypeFieldAccessExpr &&