| ... | @@ -7622,7 +7622,7 @@ fn instantiateGenericCall( | ... | @@ -7622,7 +7622,7 @@ fn instantiateGenericCall( |
| 7622 | else if (call_src == .node_offset) .{ .call_arg = .{ | 7622 | else if (call_src == .node_offset) .{ .call_arg = .{ |
| 7623 | .decl = block.src_decl, | 7623 | .decl = block.src_decl, |
| 7624 | .call_node_offset = call_src.node_offset.x, | 7624 | .call_node_offset = call_src.node_offset.x, |
| 7625 | .arg_index = @intCast(total_i), | 7625 | .arg_index = @intCast(total_i - @intFromBool(bound_arg_src != null)), |
| 7626 | } } else .unneeded; | 7626 | } } else .unneeded; |
| 7627 | | 7627 | |
| 7628 | const comptime_arg = callee.comptime_args.get(ip)[total_i]; | 7628 | const comptime_arg = callee.comptime_args.get(ip)[total_i]; |
| ... | @@ -9343,17 +9343,6 @@ fn zirParam( | ... | @@ -9343,17 +9343,6 @@ fn zirParam( |
| 9343 | assert(sema.inst_map.remove(inst)); | 9343 | assert(sema.inst_map.remove(inst)); |
| 9344 | } | 9344 | } |
| 9345 | | 9345 | |
| 9346 | if (sema.generic_owner != .none) { | | |
| 9347 | if (try sema.typeHasOnePossibleValue(param_ty)) |opv| { | | |
| 9348 | // In this case we are instantiating a generic function call with a non-comptime | | |
| 9349 | // non-anytype parameter that ended up being a one-possible-type. | | |
| 9350 | // We don't want the parameter to be part of the instantiated function type. | | |
| 9351 | sema.inst_map.putAssumeCapacity(inst, Air.internedToRef(opv.toIntern())); | | |
| 9352 | sema.comptime_args[param_index] = opv.toIntern(); | | |
| 9353 | return; | | |
| 9354 | } | | |
| 9355 | } | | |
| 9356 | | | |
| 9357 | try block.params.append(sema.arena, .{ | 9346 | try block.params.append(sema.arena, .{ |
| 9358 | .ty = param_ty.toIntern(), | 9347 | .ty = param_ty.toIntern(), |
| 9359 | .is_comptime = comptime_syntax, | 9348 | .is_comptime = comptime_syntax, |