| ... | ... | @@ -19643,7 +19643,7 @@ static ZigType *ir_analyze_instruction_fn_proto(IrAnalyze *ira, IrInstructionFnP |
| 19643 | 19643 | return ira->codegen->builtin_types.entry_invalid; |
| 19644 | 19644 | if (type_requires_comptime(param_type)) { |
| 19645 | 19645 | if (!calling_convention_allows_zig_types(fn_type_id.cc)) { |
| 19646 | | ir_add_error(ira, &instruction->base, |
| 19646 | ir_add_error(ira, param_type_value, |
| 19647 | 19647 | buf_sprintf("parameter of type '%s' not allowed in function with calling convention '%s'", |
| 19648 | 19648 | buf_ptr(&param_type->name), calling_convention_name(fn_type_id.cc))); |
| 19649 | 19649 | return ira->codegen->builtin_types.entry_invalid; |
| ... | ... | @@ -19654,6 +19654,12 @@ static ZigType *ir_analyze_instruction_fn_proto(IrAnalyze *ira, IrInstructionFnP |
| 19654 | 19654 | out_val->data.x_type = get_generic_fn_type(ira->codegen, &fn_type_id); |
| 19655 | 19655 | return ira->codegen->builtin_types.entry_type; |
| 19656 | 19656 | } |
| 19657 | if (!type_has_bits(param_type) && !calling_convention_allows_zig_types(fn_type_id.cc)) { |
| 19658 | ir_add_error(ira, param_type_value, |
| 19659 | buf_sprintf("parameter of type '%s' has 0 bits; not allowed in function with calling convention '%s'", |
| 19660 | buf_ptr(&param_type->name), calling_convention_name(fn_type_id.cc))); |
| 19661 | return ira->codegen->builtin_types.entry_invalid; |
| 19662 | } |
| 19657 | 19663 | param_info->type = param_type; |
| 19658 | 19664 | } |
| 19659 | 19665 | |