From 41cdcd5486ba10dcd21dc45cb8470c556b7497dd Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 4 May 2023 21:57:55 -0700 Subject: stage2: add a few more Value checks for InternPool --- src/type.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/type.zig') 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; -- cgit v1.2.3