Commit 6754d1a182
Changed files (1)
src
src/Sema.zig
@@ -7569,13 +7569,14 @@ fn instantiateGenericCall(
{
var runtime_i: u32 = 0;
for (uncasted_args, 0..) |uncasted_arg, total_i| {
+ // In the case of a function call generated by the language, the LazySrcLoc
+ // provided for `call_src` may not point to anything interesting.
const arg_src: LazySrcLoc = if (total_i == 0 and bound_arg_src != null)
bound_arg_src.?
- else
- .{ .call_arg = .{
- .call_node_offset = call_src.node_offset.x,
- .arg_index = @intCast(total_i),
- } };
+ else if (call_src == .node_offset) .{ .call_arg = .{
+ .call_node_offset = call_src.node_offset.x,
+ .arg_index = @intCast(total_i),
+ } } else .unneeded;
const comptime_arg = callee.comptime_args.get(ip)[total_i];
if (comptime_arg == .none) {