aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2023-05-20 15:42:21 -0400
committerAndrew Kelley <andrew@ziglang.org>2023-06-10 20:47:54 -0700
commit25cd4bb3c9220e308cae9956dc4f579c66bf175a (patch)
treee8bdf1318a1ceef76832dd46e5b1e9cfb913dbd8
parente4d498cd3add8d3ccbcb4d5899769cca49a4837c (diff)
downloadzig-25cd4bb3c9220e308cae9956dc4f579c66bf175a.tar.gz
zig-25cd4bb3c9220e308cae9956dc4f579c66bf175a.zip
Type: hack around `isNoReturn` queries for the remaining legacy tags
-rw-r--r--src/type.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/type.zig b/src/type.zig
index 64a5643eb6..f2fad91eba 100644
--- a/src/type.zig
+++ b/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.