Commit 25cd4bb3c9

Jacob Young <jacobly0@users.noreply.github.com>
2023-05-20 21:42:21
Type: hack around `isNoReturn` queries for the remaining legacy tags
1 parent e4d498c
Changed files (1)
src/type.zig
@@ -826,7 +826,7 @@ pub const Type = struct {
     }
 
     pub fn isNoReturn(ty: Type, mod: *Module) bool {
-        return mod.intern_pool.isNoReturn(ty.ip_index);
+        return if (ty.ip_index != .none) mod.intern_pool.isNoReturn(ty.ip_index) else false;
     }
 
     /// Returns 0 if the pointer is naturally aligned and the element type is 0-bit.