aboutsummaryrefslogtreecommitdiff
path: root/src/type.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-05-04 21:57:55 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-06-10 20:42:28 -0700
commit41cdcd5486ba10dcd21dc45cb8470c556b7497dd (patch)
treef4827ae6615e016508f3317a0be90ccdee614e5a /src/type.zig
parent6ab8b6f8b273356ce248a075b6a0657bfea33c79 (diff)
downloadzig-41cdcd5486ba10dcd21dc45cb8470c556b7497dd.tar.gz
zig-41cdcd5486ba10dcd21dc45cb8470c556b7497dd.zip
stage2: add a few more Value checks for InternPool
Diffstat (limited to 'src/type.zig')
-rw-r--r--src/type.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/type.zig b/src/type.zig
index 8cffddb31c..4840bca6e7 100644
--- a/src/type.zig
+++ b/src/type.zig
@@ -252,7 +252,7 @@ pub const Type = struct {
}
pub fn castTag(self: Type, comptime t: Tag) ?*t.Type() {
- assert(self.ip_index == .none);
+ if (self.ip_index != .none) return null;
if (@enumToInt(self.legacy.tag_if_small_enough) < Tag.no_payload_count)
return null;