From c6f3e9d79cf849623e6c4f25e02e17cdfab07b7c Mon Sep 17 00:00:00 2001 From: mlugg Date: Mon, 25 Mar 2024 19:02:21 +0000 Subject: Zcu.Decl: remove `ty` field `Decl` can no longer store un-interned values, so this field is now unnecessary. The type can instead be fetched with the new `typeOf` helper method, which just gets the type of the Decl's `Value`. --- src/Value.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Value.zig') diff --git a/src/Value.zig b/src/Value.zig index 3707c33d46..c220f6d0d9 100644 --- a/src/Value.zig +++ b/src/Value.zig @@ -1585,7 +1585,7 @@ pub fn sliceLen(val: Value, mod: *Module) u64 { const ip = &mod.intern_pool; return switch (ip.indexToKey(val.toIntern())) { .ptr => |ptr| switch (ip.indexToKey(switch (ptr.addr) { - .decl => |decl| mod.declPtr(decl).ty.toIntern(), + .decl => |decl| mod.declPtr(decl).typeOf(mod).toIntern(), .comptime_alloc => @panic("TODO"), .anon_decl => |anon_decl| ip.typeOf(anon_decl.val), .comptime_field => |comptime_field| ip.typeOf(comptime_field), -- cgit v1.2.3