diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-05-12 16:22:37 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-06-10 20:46:17 -0700 |
| commit | 88dbd62bcbac24c09791a7838d2f08c2f540967a (patch) | |
| tree | 9935a67bb6644fc448513eb728a1f22a587a89fb /lib/std | |
| parent | d89807efbb1bd5af0a92544298fc08ad6ba2d255 (diff) | |
| download | zig-88dbd62bcbac24c09791a7838d2f08c2f540967a.tar.gz zig-88dbd62bcbac24c09791a7838d2f08c2f540967a.zip | |
stage2: move enum tag values into the InternPool
I'm seeing a new assertion trip: the call to `enumTagFieldIndex` in the
implementation of `@Type` is attempting to query the field index of an
union's enum tag, but the type of the enum tag value provided is not the
same as the union's tag type. Most likely this is a problem with type
coercion, since values are now typed.
Another problem is that I added some hacks in std.builtin because I
didn't see any convenient way to access them from Sema. That should
definitely be cleaned up before merging this branch.
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/builtin.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig index b1f1406684..429654bd4a 100644 --- a/lib/std/builtin.zig +++ b/lib/std/builtin.zig @@ -223,6 +223,13 @@ pub const SourceLocation = struct { pub const TypeId = std.meta.Tag(Type); pub const TypeInfo = @compileError("deprecated; use Type"); +/// TODO this is a temporary alias because I don't see any handy methods in +/// Sema for accessing inner declarations. +pub const PtrSize = Type.Pointer.Size; +/// TODO this is a temporary alias because I don't see any handy methods in +/// Sema for accessing inner declarations. +pub const TmpContainerLayoutAlias = Type.ContainerLayout; + /// This data structure is used by the Zig language code generation and /// therefore must be kept in sync with the compiler implementation. pub const Type = union(enum) { |
