add compile error for missing parameter name of generic function

This commit is contained in:
Andrew Kelley
2018-07-25 18:15:55 -04:00
parent 84195467ad
commit fd575fe1f3
2 changed files with 12 additions and 0 deletions

View File

@@ -12591,6 +12591,7 @@ static bool ir_analyze_fn_call_generic_arg(IrAnalyze *ira, AstNode *fn_proto_nod
}
Buf *param_name = param_decl_node->data.param_decl.name;
if (!param_name) return false;
if (!is_var_args) {
VariableTableEntry *var = add_variable(ira->codegen, param_decl_node,
*child_scope, param_name, true, arg_val, nullptr);