mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 07:32:44 +00:00
src/analyze.cpp: default to using param_node
upon callconv error;
This commit is contained in:
parent
99adda9df5
commit
74bdc1d1f8
@ -1634,7 +1634,7 @@ static ZigType *analyze_fn_type(CodeGen *g, AstNode *proto_node, Scope *child_sc
|
||||
}
|
||||
} else if (param_node->data.param_decl.var_token != nullptr) {
|
||||
if (!calling_convention_allows_zig_types(fn_type_id.cc)) {
|
||||
add_node_error(g, param_node->data.param_decl.type,
|
||||
add_node_error(g, param_node,
|
||||
buf_sprintf("parameter of type 'var' not allowed in function with calling convention '%s'",
|
||||
calling_convention_name(fn_type_id.cc)));
|
||||
return g->builtin_types.entry_invalid;
|
||||
|
Loading…
Reference in New Issue
Block a user