aboutsummaryrefslogtreecommitdiff
path: root/src/type.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-06-09 19:23:36 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-06-09 19:23:36 -0700
commit32c90cb5539c3b340ae1b0b13d2b1521ebb6b1b0 (patch)
tree149e21f6afdce496a95d29d97a1d6e3ccd6d0f4d /src/type.zig
parentf1cff4fa4a28d42ac9055f94ee9a8f7fd2831cd7 (diff)
downloadzig-32c90cb5539c3b340ae1b0b13d2b1521ebb6b1b0.tar.gz
zig-32c90cb5539c3b340ae1b0b13d2b1521ebb6b1b0.zip
stage2: fix handling of aggregates with mixed comptime-only fields
Diffstat (limited to 'src/type.zig')
-rw-r--r--src/type.zig10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/type.zig b/src/type.zig
index 9b91572427..049630ef49 100644
--- a/src/type.zig
+++ b/src/type.zig
@@ -2365,6 +2365,7 @@ pub const Type = extern union {
.@"anyframe",
.anyopaque,
.@"opaque",
+ .type_info,
=> return true,
// These are false because they are comptime-only types.
@@ -2379,7 +2380,6 @@ pub const Type = extern union {
.enum_literal,
.empty_struct,
.empty_struct_literal,
- .type_info,
.bound_fn,
// These are function *bodies*, not pointers.
// Special exceptions have to be made when emitting functions due to
@@ -2464,14 +2464,6 @@ pub const Type = extern union {
.@"struct" => {
const struct_obj = ty.castTag(.@"struct").?.data;
- if (sema_kit) |sk| {
- _ = try sk.sema.typeRequiresComptime(sk.block, sk.src, ty);
- }
- switch (struct_obj.requires_comptime) {
- .yes => return false,
- .wip, .no => if (struct_obj.known_non_opv) return true,
- .unknown => {},
- }
if (struct_obj.status == .field_types_wip) {
// In this case, we guess that hasRuntimeBits() for this type is true,
// and then later if our guess was incorrect, we emit a compile error.