diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-02-26 14:52:45 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-26 14:52:45 -0500 |
| commit | 8349a644d0b9d4b2d58d736a14cdcc567a9e9b89 (patch) | |
| tree | 419fe3dc7cab67d43f0cc5b85040340476ab42a1 /src/type.zig | |
| parent | b3aa1ab693ac160a07c44f07c7b90577039860a1 (diff) | |
| parent | bf5c055562b88f1a686815c85d2a29c0889a97ee (diff) | |
| download | zig-8349a644d0b9d4b2d58d736a14cdcc567a9e9b89.tar.gz zig-8349a644d0b9d4b2d58d736a14cdcc567a9e9b89.zip | |
Merge pull request #10986 from Vexu/stage2
stage2: actually coerce in coerce_result_ptr at comptime
Diffstat (limited to 'src/type.zig')
| -rw-r--r-- | src/type.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/type.zig b/src/type.zig index 4eb78b0656..581465c51a 100644 --- a/src/type.zig +++ b/src/type.zig @@ -3980,7 +3980,7 @@ pub const Type = extern union { pub fn structFields(ty: Type) Module.Struct.Fields { switch (ty.tag()) { - .empty_struct => return .{}, + .empty_struct, .empty_struct_literal => return .{}, .@"struct" => { const struct_obj = ty.castTag(.@"struct").?.data; assert(struct_obj.haveFieldTypes()); @@ -3996,7 +3996,7 @@ pub const Type = extern union { const struct_obj = ty.castTag(.@"struct").?.data; return struct_obj.fields.count(); }, - .empty_struct => return 0, + .empty_struct, .empty_struct_literal => return 0, .tuple => return ty.castTag(.tuple).?.data.types.len, else => unreachable, } |
