aboutsummaryrefslogtreecommitdiff
path: root/src/type.zig
diff options
context:
space:
mode:
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 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.