| ... | @@ -6042,12 +6042,12 @@ fn instantiateGenericCall( | ... | @@ -6042,12 +6042,12 @@ fn instantiateGenericCall( |
| 6042 | .param_comptime, .param_anytype_comptime, .param, .param_anytype => {}, | 6042 | .param_comptime, .param_anytype_comptime, .param, .param_anytype => {}, |
| 6043 | else => continue, | 6043 | else => continue, |
| 6044 | } | 6044 | } |
| | 6045 | const arg_src = call_src; // TODO: better source location |
| 6045 | const is_runtime = comptime_args[total_i].val.tag() == .generic_poison and | 6046 | const is_runtime = comptime_args[total_i].val.tag() == .generic_poison and |
| 6046 | comptime_args[total_i].ty.hasRuntimeBits() and | 6047 | comptime_args[total_i].ty.hasRuntimeBits() and |
| 6047 | !comptime_args[total_i].ty.comptimeOnly(); | 6048 | !(try sema.typeRequiresComptime(block, arg_src, comptime_args[total_i].ty)); |
| 6048 | if (is_runtime) { | 6049 | if (is_runtime) { |
| 6049 | const param_ty = new_fn_info.param_types[runtime_i]; | 6050 | const param_ty = new_fn_info.param_types[runtime_i]; |
| 6050 | const arg_src = call_src; // TODO: better source location | | |
| 6051 | const uncasted_arg = uncasted_args[total_i]; | 6051 | const uncasted_arg = uncasted_args[total_i]; |
| 6052 | const casted_arg = try sema.coerce(block, param_ty, uncasted_arg, arg_src); | 6052 | const casted_arg = try sema.coerce(block, param_ty, uncasted_arg, arg_src); |
| 6053 | try sema.queueFullTypeResolution(param_ty); | 6053 | try sema.queueFullTypeResolution(param_ty); |