| ... | @@ -5498,7 +5498,7 @@ const GenericCallAdapter = struct { | ... | @@ -5498,7 +5498,7 @@ const GenericCallAdapter = struct { |
| 5498 | const this_is_comptime = this_arg.val.tag() != .generic_poison; | 5498 | const this_is_comptime = this_arg.val.tag() != .generic_poison; |
| 5499 | const other_is_comptime = other_arg.val.tag() != .generic_poison; | 5499 | const other_is_comptime = other_arg.val.tag() != .generic_poison; |
| 5500 | const this_is_anytype = this_arg.ty.tag() != .generic_poison; | 5500 | const this_is_anytype = this_arg.ty.tag() != .generic_poison; |
| 5501 | const other_is_anytype = other_key.anytype_args[i]; | 5501 | const other_is_anytype = other_key.isAnytypeParam(ctx.module, @intCast(u32, i)); |
| 5502 | | 5502 | |
| 5503 | if (other_is_anytype != this_is_anytype) return false; | 5503 | if (other_is_anytype != this_is_anytype) return false; |
| 5504 | if (other_is_comptime != this_is_comptime) return false; | 5504 | if (other_is_comptime != this_is_comptime) return false; |
| ... | @@ -6379,12 +6379,9 @@ fn instantiateGenericCall( | ... | @@ -6379,12 +6379,9 @@ fn instantiateGenericCall( |
| 6379 | errdefer new_func.deinit(gpa); | 6379 | errdefer new_func.deinit(gpa); |
| 6380 | assert(new_func == new_module_func); | 6380 | assert(new_func == new_module_func); |
| 6381 | | 6381 | |
| 6382 | const anytype_args = try new_decl_arena_allocator.alloc(bool, func_ty_info.param_types.len); | | |
| 6383 | new_func.anytype_args = anytype_args.ptr; | | |
| 6384 | arg_i = 0; | 6382 | arg_i = 0; |
| 6385 | for (fn_info.param_body) |inst| { | 6383 | for (fn_info.param_body) |inst| { |
| 6386 | var is_comptime = false; | 6384 | var is_comptime = false; |
| 6387 | var is_anytype = false; | | |
| 6388 | switch (zir_tags[inst]) { | 6385 | switch (zir_tags[inst]) { |
| 6389 | .param => { | 6386 | .param => { |
| 6390 | is_comptime = func_ty_info.paramIsComptime(arg_i); | 6387 | is_comptime = func_ty_info.paramIsComptime(arg_i); |
| ... | @@ -6393,11 +6390,9 @@ fn instantiateGenericCall( | ... | @@ -6393,11 +6390,9 @@ fn instantiateGenericCall( |
| 6393 | is_comptime = true; | 6390 | is_comptime = true; |
| 6394 | }, | 6391 | }, |
| 6395 | .param_anytype => { | 6392 | .param_anytype => { |
| 6396 | is_anytype = true; | | |
| 6397 | is_comptime = func_ty_info.paramIsComptime(arg_i); | 6393 | is_comptime = func_ty_info.paramIsComptime(arg_i); |
| 6398 | }, | 6394 | }, |
| 6399 | .param_anytype_comptime => { | 6395 | .param_anytype_comptime => { |
| 6400 | is_anytype = true; | | |
| 6401 | is_comptime = true; | 6396 | is_comptime = true; |
| 6402 | }, | 6397 | }, |
| 6403 | else => continue, | 6398 | else => continue, |
| ... | @@ -6405,10 +6400,9 @@ fn instantiateGenericCall( | ... | @@ -6405,10 +6400,9 @@ fn instantiateGenericCall( |
| 6405 | | 6400 | |
| 6406 | // We populate the Type here regardless because it is needed by | 6401 | // We populate the Type here regardless because it is needed by |
| 6407 | // `GenericCallAdapter.eql` as well as function body analysis. | 6402 | // `GenericCallAdapter.eql` as well as function body analysis. |
| 6408 | // Whether it is anytype is communicated by `anytype_args`. | 6403 | // Whether it is anytype is communicated by `isAnytypeParam`. |
| 6409 | const arg = child_sema.inst_map.get(inst).?; | 6404 | const arg = child_sema.inst_map.get(inst).?; |
| 6410 | const copied_arg_ty = try child_sema.typeOf(arg).copy(new_decl_arena_allocator); | 6405 | const copied_arg_ty = try child_sema.typeOf(arg).copy(new_decl_arena_allocator); |
| 6411 | anytype_args[arg_i] = is_anytype; | | |
| 6412 | | 6406 | |
| 6413 | if (try sema.typeRequiresComptime(block, .unneeded, copied_arg_ty)) { | 6407 | if (try sema.typeRequiresComptime(block, .unneeded, copied_arg_ty)) { |
| 6414 | is_comptime = true; | 6408 | is_comptime = true; |
| ... | @@ -7760,7 +7754,6 @@ fn funcCommon( | ... | @@ -7760,7 +7754,6 @@ fn funcCommon( |
| 7760 | .zir_body_inst = func_inst, | 7754 | .zir_body_inst = func_inst, |
| 7761 | .owner_decl = sema.owner_decl_index, | 7755 | .owner_decl = sema.owner_decl_index, |
| 7762 | .comptime_args = comptime_args, | 7756 | .comptime_args = comptime_args, |
| 7763 | .anytype_args = undefined, | | |
| 7764 | .hash = hash, | 7757 | .hash = hash, |
| 7765 | .lbrace_line = src_locs.lbrace_line, | 7758 | .lbrace_line = src_locs.lbrace_line, |
| 7766 | .rbrace_line = src_locs.rbrace_line, | 7759 | .rbrace_line = src_locs.rbrace_line, |