diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-05-20 15:50:56 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-06-10 20:47:53 -0700 |
| commit | dfb3521160eb4397b7482de68796d370230a8d11 (patch) | |
| tree | f40c8351fec5f2a71e76d402a4d37fdc57f5858e /src/Sema.zig | |
| parent | 115c08956278b79c848e04c2f4eefca40e6cd8a3 (diff) | |
| download | zig-dfb3521160eb4397b7482de68796d370230a8d11.tar.gz zig-dfb3521160eb4397b7482de68796d370230a8d11.zip | |
compiler: remove var_args_param_type from SimpleType
This is now represented instead by a special `InternPool.Index.Tag` that
has no corresponding type/value.
Diffstat (limited to 'src/Sema.zig')
| -rw-r--r-- | src/Sema.zig | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Sema.zig b/src/Sema.zig index c98c61ddc4..4f0bfd7120 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -31657,7 +31657,6 @@ pub fn resolveTypeRequiresComptime(sema: *Sema, ty: Type) CompileError!bool { .anyerror, .noreturn, .generic_poison, - .var_args_param, .atomic_order, .atomic_rmw_op, .calling_convention, @@ -31856,6 +31855,8 @@ pub fn resolveTypeFields(sema: *Sema, ty: Type) CompileError!Type { const mod = sema.mod; switch (ty.ip_index) { + .var_args_param_type => unreachable, + // TODO: After the InternPool transition is complete, change this to `unreachable`. .none => return ty, @@ -31909,7 +31910,6 @@ pub fn resolveTypeFields(sema: *Sema, ty: Type) CompileError!Type { .const_slice_u8_sentinel_0_type, .anyerror_void_error_union_type, .generic_poison_type, - .var_args_param_type, .empty_struct_type, => return ty, @@ -33123,7 +33123,6 @@ pub fn typeHasOnePossibleValue(sema: *Sema, ty: Type) CompileError!?Value { .undefined => Value.undef, .generic_poison => return error.GenericPoison, - .var_args_param => unreachable, }, .struct_type => |struct_type| { const resolved_ty = try sema.resolveTypeFields(ty); @@ -33678,8 +33677,6 @@ pub fn typeRequiresComptime(sema: *Sema, ty: Type) CompileError!bool { .enum_literal, .type_info, => true, - - .var_args_param => unreachable, }, .struct_type => |struct_type| { const struct_obj = mod.structPtrUnwrap(struct_type.index) orelse return false; |
