| ... | @@ -20226,9 +20226,12 @@ static bool ir_analyze_fn_call_generic_arg(IrAnalyze *ira, AstNode *fn_proto_nod | ... | @@ -20226,9 +20226,12 @@ static bool ir_analyze_fn_call_generic_arg(IrAnalyze *ira, AstNode *fn_proto_nod |
| 20226 | bool is_var_args = param_decl_node->data.param_decl.is_var_args; | 20226 | bool is_var_args = param_decl_node->data.param_decl.is_var_args; |
| 20227 | bool arg_part_of_generic_id = false; | 20227 | bool arg_part_of_generic_id = false; |
| 20228 | IrInstGen *casted_arg; | 20228 | IrInstGen *casted_arg; |
| | 20229 | |
| | 20230 | ZigType *param_info_type = nullptr; |
| 20229 | if (is_var_args) { | 20231 | if (is_var_args) { |
| 20230 | arg_part_of_generic_id = true; | 20232 | arg_part_of_generic_id = true; |
| 20231 | casted_arg = arg; | 20233 | casted_arg = arg; |
| | 20234 | param_info_type = arg->value->type; |
| 20232 | } else { | 20235 | } else { |
| 20233 | if (param_decl_node->data.param_decl.anytype_token == nullptr) { | 20236 | if (param_decl_node->data.param_decl.anytype_token == nullptr) { |
| 20234 | AstNode *param_type_node = param_decl_node->data.param_decl.type; | 20237 | AstNode *param_type_node = param_decl_node->data.param_decl.type; |
| ... | @@ -20239,9 +20242,12 @@ static bool ir_analyze_fn_call_generic_arg(IrAnalyze *ira, AstNode *fn_proto_nod | ... | @@ -20239,9 +20242,12 @@ static bool ir_analyze_fn_call_generic_arg(IrAnalyze *ira, AstNode *fn_proto_nod |
| 20239 | casted_arg = ir_implicit_cast2(ira, arg_src, arg, param_type); | 20242 | casted_arg = ir_implicit_cast2(ira, arg_src, arg, param_type); |
| 20240 | if (type_is_invalid(casted_arg->value->type)) | 20243 | if (type_is_invalid(casted_arg->value->type)) |
| 20241 | return false; | 20244 | return false; |
| | 20245 | |
| | 20246 | param_info_type = param_type; |
| 20242 | } else { | 20247 | } else { |
| 20243 | arg_part_of_generic_id = true; | 20248 | arg_part_of_generic_id = true; |
| 20244 | casted_arg = arg; | 20249 | casted_arg = arg; |
| | 20250 | param_info_type = arg->value->type; |
| 20245 | } | 20251 | } |
| 20246 | } | 20252 | } |
| 20247 | | 20253 | |
| ... | @@ -20298,7 +20304,7 @@ static bool ir_analyze_fn_call_generic_arg(IrAnalyze *ira, AstNode *fn_proto_nod | ... | @@ -20298,7 +20304,7 @@ static bool ir_analyze_fn_call_generic_arg(IrAnalyze *ira, AstNode *fn_proto_nod |
| 20298 | if (!comptime_arg) { | 20304 | if (!comptime_arg) { |
| 20299 | casted_args[fn_type_id->param_count] = casted_arg; | 20305 | casted_args[fn_type_id->param_count] = casted_arg; |
| 20300 | FnTypeParamInfo *param_info = &fn_type_id->param_info[fn_type_id->param_count]; | 20306 | FnTypeParamInfo *param_info = &fn_type_id->param_info[fn_type_id->param_count]; |
| 20301 | param_info->type = casted_arg->value->type; | 20307 | param_info->type = param_info_type; |
| 20302 | param_info->is_noalias = param_decl_node->data.param_decl.is_noalias; | 20308 | param_info->is_noalias = param_decl_node->data.param_decl.is_noalias; |
| 20303 | impl_fn->param_source_nodes[fn_type_id->param_count] = param_decl_node; | 20309 | impl_fn->param_source_nodes[fn_type_id->param_count] = param_decl_node; |
| 20304 | fn_type_id->param_count += 1; | 20310 | fn_type_id->param_count += 1; |