aboutsummaryrefslogtreecommitdiff
path: root/src/type.zig
diff options
context:
space:
mode:
authorMeghan Denny <hello@nektro.net>2023-11-25 15:02:32 -0800
committerAndrew Kelley <andrew@ziglang.org>2023-11-26 02:24:40 -0500
commit2549de80b226cddd0664ce4ad8c40887101f302b (patch)
tree9674c446649114e88339256b24ef00660e1a168b /src/type.zig
parent7103088e4a51d4362e6665d5949a9677e18fb74a (diff)
downloadzig-2549de80b226cddd0664ce4ad8c40887101f302b.tar.gz
zig-2549de80b226cddd0664ce4ad8c40887101f302b.zip
move Module.Decl.Index and Module.Namespace.Index to InternPool
Diffstat (limited to 'src/type.zig')
-rw-r--r--src/type.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/type.zig b/src/type.zig
index b914432793..dbf73c0eb2 100644
--- a/src/type.zig
+++ b/src/type.zig
@@ -2778,7 +2778,7 @@ pub const Type = struct {
}
/// Returns null if the type has no namespace.
- pub fn getNamespaceIndex(ty: Type, mod: *Module) Module.Namespace.OptionalIndex {
+ pub fn getNamespaceIndex(ty: Type, mod: *Module) InternPool.OptionalNamespaceIndex {
return switch (mod.intern_pool.indexToKey(ty.toIntern())) {
.opaque_type => |opaque_type| opaque_type.namespace.toOptional(),
.struct_type => |struct_type| struct_type.namespace,
@@ -3123,11 +3123,11 @@ pub const Type = struct {
};
}
- pub fn getOwnerDecl(ty: Type, mod: *Module) Module.Decl.Index {
+ pub fn getOwnerDecl(ty: Type, mod: *Module) InternPool.DeclIndex {
return ty.getOwnerDeclOrNull(mod) orelse unreachable;
}
- pub fn getOwnerDeclOrNull(ty: Type, mod: *Module) ?Module.Decl.Index {
+ pub fn getOwnerDeclOrNull(ty: Type, mod: *Module) ?InternPool.DeclIndex {
return switch (mod.intern_pool.indexToKey(ty.toIntern())) {
.struct_type => |struct_type| struct_type.decl.unwrap(),
.union_type => |union_type| union_type.decl,