| ... | ... | @@ -4238,7 +4238,8 @@ AstNode *get_param_decl_node(ZigFn *fn_entry, size_t index) { |
| 4238 | 4238 | return nullptr; |
| 4239 | 4239 | } |
| 4240 | 4240 | |
| 4241 | | static void define_local_param_variables(CodeGen *g, ZigFn *fn_table_entry) { |
| 4241 | static Error define_local_param_variables(CodeGen *g, ZigFn *fn_table_entry) { |
| 4242 | Error err; |
| 4242 | 4243 | ZigType *fn_type = fn_table_entry->type_entry; |
| 4243 | 4244 | assert(!fn_type->data.fn.is_generic); |
| 4244 | 4245 | FnTypeId *fn_type_id = &fn_type->data.fn.fn_type_id; |
| ... | ... | @@ -4257,8 +4258,11 @@ static void define_local_param_variables(CodeGen *g, ZigFn *fn_table_entry) { |
| 4257 | 4258 | } |
| 4258 | 4259 | |
| 4259 | 4260 | ZigType *param_type = param_info->type; |
| 4260 | | bool is_noalias = param_info->is_noalias; |
| 4261 | if ((err = type_resolve(g, param_type, ResolveStatusSizeKnown))) { |
| 4262 | return err; |
| 4263 | } |
| 4261 | 4264 | |
| 4265 | bool is_noalias = param_info->is_noalias; |
| 4262 | 4266 | if (is_noalias && get_codegen_ptr_type(param_type) == nullptr) { |
| 4263 | 4267 | add_node_error(g, param_decl_node, buf_sprintf("noalias on non-pointer parameter")); |
| 4264 | 4268 | } |
| ... | ... | @@ -4273,6 +4277,8 @@ static void define_local_param_variables(CodeGen *g, ZigFn *fn_table_entry) { |
| 4273 | 4277 | fn_table_entry->variable_list.append(var); |
| 4274 | 4278 | } |
| 4275 | 4279 | } |
| 4280 | |
| 4281 | return ErrorNone; |
| 4276 | 4282 | } |
| 4277 | 4283 | |
| 4278 | 4284 | bool resolve_inferred_error_set(CodeGen *g, ZigType *err_set_type, AstNode *source_node) { |
| ... | ... | @@ -4596,7 +4602,10 @@ static void analyze_fn_body(CodeGen *g, ZigFn *fn_table_entry) { |
| 4596 | 4602 | if (!fn_table_entry->child_scope) |
| 4597 | 4603 | fn_table_entry->child_scope = &fn_table_entry->fndef_scope->base; |
| 4598 | 4604 | |
| 4599 | | define_local_param_variables(g, fn_table_entry); |
| 4605 | if (define_local_param_variables(g, fn_table_entry) != ErrorNone) { |
| 4606 | fn_table_entry->anal_state = FnAnalStateInvalid; |
| 4607 | return; |
| 4608 | } |
| 4600 | 4609 | |
| 4601 | 4610 | ZigType *fn_type = fn_table_entry->type_entry; |
| 4602 | 4611 | assert(!fn_type->data.fn.is_generic); |