diff options
| author | r00ster91 <r00ster91@proton.me> | 2022-12-13 22:30:06 +0100 |
|---|---|---|
| committer | r00ster91 <r00ster91@proton.me> | 2022-12-17 14:11:33 +0100 |
| commit | aac2d6b56f32134ea32fb3d984e3fcdfddd8aaf6 (patch) | |
| tree | 941528727d4d0a5b92f58c0b862f0d5f372b89e0 /src | |
| parent | 7350ea3e2da4d4e6ef5092cd9f0832beef0291d5 (diff) | |
| download | zig-aac2d6b56f32134ea32fb3d984e3fcdfddd8aaf6.tar.gz zig-aac2d6b56f32134ea32fb3d984e3fcdfddd8aaf6.zip | |
std.builtin: rename Type.UnionField and Type.StructField's field_type to type
Diffstat (limited to 'src')
| -rw-r--r-- | src/Air.zig | 2 | ||||
| -rw-r--r-- | src/AstGen.zig | 2 | ||||
| -rw-r--r-- | src/Autodoc.zig | 4 | ||||
| -rw-r--r-- | src/InternPool.zig | 4 | ||||
| -rw-r--r-- | src/Liveness.zig | 2 | ||||
| -rw-r--r-- | src/Sema.zig | 22 | ||||
| -rw-r--r-- | src/Zir.zig | 2 | ||||
| -rw-r--r-- | src/arch/aarch64/CodeGen.zig | 2 | ||||
| -rw-r--r-- | src/arch/aarch64/Mir.zig | 2 | ||||
| -rw-r--r-- | src/arch/arm/CodeGen.zig | 2 | ||||
| -rw-r--r-- | src/arch/arm/Mir.zig | 2 | ||||
| -rw-r--r-- | src/arch/riscv64/CodeGen.zig | 2 | ||||
| -rw-r--r-- | src/arch/riscv64/Mir.zig | 2 | ||||
| -rw-r--r-- | src/arch/sparc64/Mir.zig | 2 | ||||
| -rw-r--r-- | src/arch/wasm/CodeGen.zig | 2 | ||||
| -rw-r--r-- | src/arch/wasm/Mir.zig | 2 | ||||
| -rw-r--r-- | src/arch/x86_64/CodeGen.zig | 2 | ||||
| -rw-r--r-- | src/arch/x86_64/Mir.zig | 2 | ||||
| -rw-r--r-- | src/codegen/spirv/Section.zig | 14 | ||||
| -rw-r--r-- | src/link/tapi/yaml.zig | 10 | ||||
| -rw-r--r-- | src/print_zir.zig | 8 | ||||
| -rw-r--r-- | src/translate_c/ast.zig | 4 | ||||
| -rw-r--r-- | src/type.zig | 2 | ||||
| -rw-r--r-- | src/value.zig | 2 |
24 files changed, 50 insertions, 50 deletions
diff --git a/src/Air.zig b/src/Air.zig index 707e700f08..7528d72bda 100644 --- a/src/Air.zig +++ b/src/Air.zig @@ -1260,7 +1260,7 @@ pub fn extraData(air: Air, comptime T: type, index: usize) struct { data: T, end var i: usize = index; var result: T = undefined; inline for (fields) |field| { - @field(result, field.name) = switch (field.field_type) { + @field(result, field.name) = switch (field.type) { u32 => air.extra[i], Inst.Ref => @intToEnum(Inst.Ref, air.extra[i]), i32 => @bitCast(i32, air.extra[i]), diff --git a/src/AstGen.zig b/src/AstGen.zig index 8df3d56a88..9d9fae3c13 100644 --- a/src/AstGen.zig +++ b/src/AstGen.zig @@ -79,7 +79,7 @@ fn setExtra(astgen: *AstGen, index: usize, extra: anytype) void { const fields = std.meta.fields(@TypeOf(extra)); var i = index; inline for (fields) |field| { - astgen.extra.items[i] = switch (field.field_type) { + astgen.extra.items[i] = switch (field.type) { u32 => @field(extra, field.name), Zir.Inst.Ref => @enumToInt(@field(extra, field.name)), i32 => @bitCast(u32, @field(extra, field.name)), diff --git a/src/Autodoc.zig b/src/Autodoc.zig index 55ff048482..246b97037a 100644 --- a/src/Autodoc.zig +++ b/src/Autodoc.zig @@ -637,9 +637,9 @@ const DocData = struct { inline for (comptime std.meta.fields(Type)) |case| { if (@field(Type, case.name) == active_tag) { const current_value = @field(self, case.name); - inline for (comptime std.meta.fields(case.field_type)) |f| { + inline for (comptime std.meta.fields(case.type)) |f| { try jsw.arrayElem(); - if (f.field_type == std.builtin.Type.Pointer.Size) { + if (f.type == std.builtin.Type.Pointer.Size) { try jsw.emitNumber(@enumToInt(@field(current_value, f.name))); } else { try std.json.stringify(@field(current_value, f.name), opts, w); diff --git a/src/InternPool.zig b/src/InternPool.zig index 5e50780315..74155ca657 100644 --- a/src/InternPool.zig +++ b/src/InternPool.zig @@ -259,7 +259,7 @@ fn addExtraAssumeCapacity(ip: *InternPool, extra: anytype) u32 { const fields = std.meta.fields(@TypeOf(extra)); const result = @intCast(u32, ip.extra.items.len); inline for (fields) |field| { - ip.extra.appendAssumeCapacity(switch (field.field_type) { + ip.extra.appendAssumeCapacity(switch (field.type) { u32 => @field(extra, field.name), Index => @enumToInt(@field(extra, field.name)), i32 => @bitCast(u32, @field(extra, field.name)), @@ -274,7 +274,7 @@ fn extraData(ip: InternPool, comptime T: type, index: usize) T { var i: usize = index; var result: T = undefined; inline for (fields) |field| { - @field(result, field.name) = switch (field.field_type) { + @field(result, field.name) = switch (field.type) { u32 => ip.extra.items[i], Index => @intToEnum(Index, ip.extra.items[i]), i32 => @bitCast(i32, ip.extra.items[i]), diff --git a/src/Liveness.zig b/src/Liveness.zig index d129dc01bf..b5fd597326 100644 --- a/src/Liveness.zig +++ b/src/Liveness.zig @@ -718,7 +718,7 @@ const Analysis = struct { const fields = std.meta.fields(@TypeOf(extra)); const result = @intCast(u32, a.extra.items.len); inline for (fields) |field| { - a.extra.appendAssumeCapacity(switch (field.field_type) { + a.extra.appendAssumeCapacity(switch (field.type) { u32 => @field(extra, field.name), else => @compileError("bad field type"), }); diff --git a/src/Sema.zig b/src/Sema.zig index ab839f19a3..6f1af51d28 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -15767,7 +15767,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai union_field_fields.* = .{ // name: []const u8, name_val, - // field_type: type, + // type: type, try Value.Tag.ty.create(fields_anon_decl.arena(), field.ty), // alignment: comptime_int, try Value.Tag.int_u64.create(fields_anon_decl.arena(), alignment), @@ -15880,7 +15880,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai struct_field_fields.* = .{ // name: []const u8, name_val, - // field_type: type, + // type: type, try Value.Tag.ty.create(fields_anon_decl.arena(), field_ty), // default_value: ?*const anyopaque, try default_val_ptr.copy(fields_anon_decl.arena()), @@ -15925,7 +15925,7 @@ fn zirTypeInfo(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai struct_field_fields.* = .{ // name: []const u8, name_val, - // field_type: type, + // type: type, try Value.Tag.ty.create(fields_anon_decl.arena(), field.ty), // default_value: ?*const anyopaque, try default_val_ptr.copy(fields_anon_decl.arena()), @@ -18574,8 +18574,8 @@ fn zirReify(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstData, in // TODO use reflection instead of magic numbers here // name: []const u8 const name_val = field_struct_val[0]; - // field_type: type, - const field_type_val = field_struct_val[1]; + // type: type, + const type_val = field_struct_val[1]; // alignment: comptime_int, const alignment_val = field_struct_val[2]; @@ -18609,7 +18609,7 @@ fn zirReify(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstData, in } var buffer: Value.ToTypeBuffer = undefined; - const field_ty = try field_type_val.toType(&buffer).copy(new_decl_arena_allocator); + const field_ty = try type_val.toType(&buffer).copy(new_decl_arena_allocator); gop.value_ptr.* = .{ .ty = field_ty, .abi_align = @intCast(u32, (try alignment_val.getUnsignedIntAdvanced(target, sema)).?), @@ -18828,9 +18828,9 @@ fn reifyStruct( // TODO use reflection instead of magic numbers here // name: []const u8 const name_val = field_struct_val[0]; - // field_type: type, - const field_type_val = field_struct_val[1]; - //default_value: ?*const anyopaque, + // type: type, + const type_val = field_struct_val[1]; + // default_value: ?*const anyopaque, const default_value_val = field_struct_val[2]; // is_comptime: bool, const is_comptime_val = field_struct_val[3]; @@ -18893,7 +18893,7 @@ fn reifyStruct( } var buffer: Value.ToTypeBuffer = undefined; - const field_ty = try field_type_val.toType(&buffer).copy(new_decl_arena_allocator); + const field_ty = try type_val.toType(&buffer).copy(new_decl_arena_allocator); gop.value_ptr.* = .{ .ty = field_ty, .abi_align = abi_align, @@ -31439,7 +31439,7 @@ pub fn addExtraAssumeCapacity(sema: *Sema, extra: anytype) u32 { const fields = std.meta.fields(@TypeOf(extra)); const result = @intCast(u32, sema.air_extra.items.len); inline for (fields) |field| { - sema.air_extra.appendAssumeCapacity(switch (field.field_type) { + sema.air_extra.appendAssumeCapacity(switch (field.type) { u32 => @field(extra, field.name), Air.Inst.Ref => @enumToInt(@field(extra, field.name)), i32 => @bitCast(u32, @field(extra, field.name)), diff --git a/src/Zir.zig b/src/Zir.zig index 6e7164878c..faa8d43638 100644 --- a/src/Zir.zig +++ b/src/Zir.zig @@ -71,7 +71,7 @@ pub fn extraData(code: Zir, comptime T: type, index: usize) struct { data: T, en var i: usize = index; var result: T = undefined; inline for (fields) |field| { - @field(result, field.name) = switch (field.field_type) { + @field(result, field.name) = switch (field.type) { u32 => code.extra[i], Inst.Ref => @intToEnum(Inst.Ref, code.extra[i]), i32 => @bitCast(i32, code.extra[i]), diff --git a/src/arch/aarch64/CodeGen.zig b/src/arch/aarch64/CodeGen.zig index 8c87a005d5..acaffad5fe 100644 --- a/src/arch/aarch64/CodeGen.zig +++ b/src/arch/aarch64/CodeGen.zig @@ -477,7 +477,7 @@ pub fn addExtraAssumeCapacity(self: *Self, extra: anytype) u32 { const fields = std.meta.fields(@TypeOf(extra)); const result = @intCast(u32, self.mir_extra.items.len); inline for (fields) |field| { - self.mir_extra.appendAssumeCapacity(switch (field.field_type) { + self.mir_extra.appendAssumeCapacity(switch (field.type) { u32 => @field(extra, field.name), i32 => @bitCast(u32, @field(extra, field.name)), else => @compileError("bad field type"), diff --git a/src/arch/aarch64/Mir.zig b/src/arch/aarch64/Mir.zig index e5541a5988..cc478c874a 100644 --- a/src/arch/aarch64/Mir.zig +++ b/src/arch/aarch64/Mir.zig @@ -505,7 +505,7 @@ pub fn extraData(mir: Mir, comptime T: type, index: usize) struct { data: T, end var i: usize = index; var result: T = undefined; inline for (fields) |field| { - @field(result, field.name) = switch (field.field_type) { + @field(result, field.name) = switch (field.type) { u32 => mir.extra[i], i32 => @bitCast(i32, mir.extra[i]), else => @compileError("bad field type"), diff --git a/src/arch/arm/CodeGen.zig b/src/arch/arm/CodeGen.zig index 9d6d18d5c9..be0a35f54d 100644 --- a/src/arch/arm/CodeGen.zig +++ b/src/arch/arm/CodeGen.zig @@ -386,7 +386,7 @@ pub fn addExtraAssumeCapacity(self: *Self, extra: anytype) u32 { const fields = std.meta.fields(@TypeOf(extra)); const result = @intCast(u32, self.mir_extra.items.len); inline for (fields) |field| { - self.mir_extra.appendAssumeCapacity(switch (field.field_type) { + self.mir_extra.appendAssumeCapacity(switch (field.type) { u32 => @field(extra, field.name), i32 => @bitCast(u32, @field(extra, field.name)), else => @compileError("bad field type"), diff --git a/src/arch/arm/Mir.zig b/src/arch/arm/Mir.zig index 3478d8dc58..07a8384c2c 100644 --- a/src/arch/arm/Mir.zig +++ b/src/arch/arm/Mir.zig @@ -283,7 +283,7 @@ pub fn extraData(mir: Mir, comptime T: type, index: usize) struct { data: T, end var i: usize = index; var result: T = undefined; inline for (fields) |field| { - @field(result, field.name) = switch (field.field_type) { + @field(result, field.name) = switch (field.type) { u32 => mir.extra[i], i32 => @bitCast(i32, mir.extra[i]), else => @compileError("bad field type"), diff --git a/src/arch/riscv64/CodeGen.zig b/src/arch/riscv64/CodeGen.zig index 24e24076f7..1aa443341f 100644 --- a/src/arch/riscv64/CodeGen.zig +++ b/src/arch/riscv64/CodeGen.zig @@ -340,7 +340,7 @@ pub fn addExtraAssumeCapacity(self: *Self, extra: anytype) u32 { const fields = std.meta.fields(@TypeOf(extra)); const result = @intCast(u32, self.mir_extra.items.len); inline for (fields) |field| { - self.mir_extra.appendAssumeCapacity(switch (field.field_type) { + self.mir_extra.appendAssumeCapacity(switch (field.type) { u32 => @field(extra, field.name), i32 => @bitCast(u32, @field(extra, field.name)), else => @compileError("bad field type"), diff --git a/src/arch/riscv64/Mir.zig b/src/arch/riscv64/Mir.zig index 5df3a86229..97accb7642 100644 --- a/src/arch/riscv64/Mir.zig +++ b/src/arch/riscv64/Mir.zig @@ -132,7 +132,7 @@ pub fn extraData(mir: Mir, comptime T: type, index: usize) struct { data: T, end var i: usize = index; var result: T = undefined; inline for (fields) |field| { - @field(result, field.name) = switch (field.field_type) { + @field(result, field.name) = switch (field.type) { u32 => mir.extra[i], i32 => @bitCast(i32, mir.extra[i]), else => @compileError("bad field type"), diff --git a/src/arch/sparc64/Mir.zig b/src/arch/sparc64/Mir.zig index 744bd84943..f854152a2f 100644 --- a/src/arch/sparc64/Mir.zig +++ b/src/arch/sparc64/Mir.zig @@ -347,7 +347,7 @@ pub fn extraData(mir: Mir, comptime T: type, index: usize) struct { data: T, end var i: usize = index; var result: T = undefined; inline for (fields) |field| { - @field(result, field.name) = switch (field.field_type) { + @field(result, field.name) = switch (field.type) { u32 => mir.extra[i], i32 => @bitCast(i32, mir.extra[i]), else => @compileError("bad field type"), diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig index 70a2aea3c9..d175b96034 100644 --- a/src/arch/wasm/CodeGen.zig +++ b/src/arch/wasm/CodeGen.zig @@ -960,7 +960,7 @@ fn addExtraAssumeCapacity(func: *CodeGen, extra: anytype) error{OutOfMemory}!u32 const fields = std.meta.fields(@TypeOf(extra)); const result = @intCast(u32, func.mir_extra.items.len); inline for (fields) |field| { - func.mir_extra.appendAssumeCapacity(switch (field.field_type) { + func.mir_extra.appendAssumeCapacity(switch (field.type) { u32 => @field(extra, field.name), else => |field_type| @compileError("Unsupported field type " ++ @typeName(field_type)), }); diff --git a/src/arch/wasm/Mir.zig b/src/arch/wasm/Mir.zig index 0f33dd9350..66969a9c21 100644 --- a/src/arch/wasm/Mir.zig +++ b/src/arch/wasm/Mir.zig @@ -589,7 +589,7 @@ pub fn extraData(self: *const Mir, comptime T: type, index: usize) struct { data var i: usize = index; var result: T = undefined; inline for (fields) |field| { - @field(result, field.name) = switch (field.field_type) { + @field(result, field.name) = switch (field.type) { u32 => self.extra[i], else => |field_type| @compileError("Unsupported field type " ++ @typeName(field_type)), }; diff --git a/src/arch/x86_64/CodeGen.zig b/src/arch/x86_64/CodeGen.zig index d0599150bd..e0cf3b946d 100644 --- a/src/arch/x86_64/CodeGen.zig +++ b/src/arch/x86_64/CodeGen.zig @@ -374,7 +374,7 @@ pub fn addExtraAssumeCapacity(self: *Self, extra: anytype) u32 { const fields = std.meta.fields(@TypeOf(extra)); const result = @intCast(u32, self.mir_extra.items.len); inline for (fields) |field| { - self.mir_extra.appendAssumeCapacity(switch (field.field_type) { + self.mir_extra.appendAssumeCapacity(switch (field.type) { u32 => @field(extra, field.name), i32 => @bitCast(u32, @field(extra, field.name)), else => @compileError("bad field type"), diff --git a/src/arch/x86_64/Mir.zig b/src/arch/x86_64/Mir.zig index 5bd8dc68f6..df2052ca6e 100644 --- a/src/arch/x86_64/Mir.zig +++ b/src/arch/x86_64/Mir.zig @@ -612,7 +612,7 @@ pub fn extraData(mir: Mir, comptime T: type, index: usize) struct { data: T, end var i: usize = index; var result: T = undefined; inline for (fields) |field| { - @field(result, field.name) = switch (field.field_type) { + @field(result, field.name) = switch (field.type) { u32 => mir.extra[i], i32 => @bitCast(i32, mir.extra[i]), else => @compileError("bad field type"), diff --git a/src/codegen/spirv/Section.zig b/src/codegen/spirv/Section.zig index 768525028e..83f594dcef 100644 --- a/src/codegen/spirv/Section.zig +++ b/src/codegen/spirv/Section.zig @@ -116,7 +116,7 @@ fn writeOperands(section: *Section, comptime Operands: type, operands: Operands) }; inline for (fields) |field| { - section.writeOperand(field.field_type, @field(operands, field.name)); + section.writeOperand(field.type, @field(operands, field.name)); } } @@ -196,7 +196,7 @@ fn writeContextDependentNumber(section: *Section, operand: spec.LiteralContextDe fn writeExtendedMask(section: *Section, comptime Operand: type, operand: Operand) void { var mask: Word = 0; inline for (@typeInfo(Operand).Struct.fields) |field, bit| { - switch (@typeInfo(field.field_type)) { + switch (@typeInfo(field.type)) { .Optional => if (@field(operand, field.name) != null) { mask |= 1 << @intCast(u5, bit); }, @@ -214,7 +214,7 @@ fn writeExtendedMask(section: *Section, comptime Operand: type, operand: Operand section.writeWord(mask); inline for (@typeInfo(Operand).Struct.fields) |field| { - switch (@typeInfo(field.field_type)) { + switch (@typeInfo(field.type)) { .Optional => |info| if (@field(operand, field.name)) |child| { section.writeOperands(info.child, child); }, @@ -230,7 +230,7 @@ fn writeExtendedUnion(section: *Section, comptime Operand: type, operand: Operan inline for (@typeInfo(Operand).Union.fields) |field| { if (@field(Operand, field.name) == tag) { - section.writeOperands(field.field_type, @field(operand, field.name)); + section.writeOperands(field.type, @field(operand, field.name)); return; } } @@ -250,7 +250,7 @@ fn operandsSize(comptime Operands: type, operands: Operands) usize { var total: usize = 0; inline for (fields) |field| { - total += operandSize(field.field_type, @field(operands, field.name)); + total += operandSize(field.type, @field(operands, field.name)); } return total; @@ -304,7 +304,7 @@ fn extendedMaskSize(comptime Operand: type, operand: Operand) usize { var total: usize = 0; var any_set = false; inline for (@typeInfo(Operand).Struct.fields) |field| { - switch (@typeInfo(field.field_type)) { + switch (@typeInfo(field.type)) { .Optional => |info| if (@field(operand, field.name)) |child| { total += operandsSize(info.child, child); any_set = true; @@ -326,7 +326,7 @@ fn extendedUnionSize(comptime Operand: type, operand: Operand) usize { inline for (@typeInfo(Operand).Union.fields) |field| { if (@field(Operand, field.name) == tag) { // Add one for the tag itself. - return 1 + operandsSize(field.field_type, @field(operand, field.name)); + return 1 + operandsSize(field.type, @field(operand, field.name)); } } unreachable; diff --git a/src/link/tapi/yaml.zig b/src/link/tapi/yaml.zig index 9039d3b4f1..748f1c138f 100644 --- a/src/link/tapi/yaml.zig +++ b/src/link/tapi/yaml.zig @@ -339,7 +339,7 @@ pub const Yaml = struct { if (union_info.tag_type) |_| { inline for (union_info.fields) |field| { - if (self.parseValue(field.field_type, value)) |u_value| { + if (self.parseValue(field.type, value)) |u_value| { return @unionInit(T, field.name, u_value); } else |err| { if (@as(@TypeOf(err) || error{TypeMismatch}, err) != error.TypeMismatch) return err; @@ -366,16 +366,16 @@ pub const Yaml = struct { break :blk map.get(field_name); }; - if (@typeInfo(field.field_type) == .Optional) { - @field(parsed, field.name) = try self.parseOptional(field.field_type, value); + if (@typeInfo(field.type) == .Optional) { + @field(parsed, field.name) = try self.parseOptional(field.type, value); continue; } const unwrapped = value orelse { - log.debug("missing struct field: {s}: {s}", .{ field.name, @typeName(field.field_type) }); + log.debug("missing struct field: {s}: {s}", .{ field.name, @typeName(field.type) }); return error.StructFieldMissing; }; - @field(parsed, field.name) = try self.parseValue(field.field_type, unwrapped); + @field(parsed, field.name) = try self.parseValue(field.type, unwrapped); } return parsed; diff --git a/src/print_zir.zig b/src/print_zir.zig index 6dbaf51bc3..b17ef954fc 100644 --- a/src/print_zir.zig +++ b/src/print_zir.zig @@ -1312,7 +1312,7 @@ const Writer = struct { type_len: u32 = 0, align_len: u32 = 0, init_len: u32 = 0, - field_type: Zir.Inst.Ref = .none, + type: Zir.Inst.Ref = .none, name: u32, is_comptime: bool, }; @@ -1353,7 +1353,7 @@ const Writer = struct { if (has_type_body) { fields[field_i].type_len = self.code.extra[extra_index]; } else { - fields[field_i].field_type = @intToEnum(Zir.Inst.Ref, self.code.extra[extra_index]); + fields[field_i].type = @intToEnum(Zir.Inst.Ref, self.code.extra[extra_index]); } extra_index += 1; @@ -1384,8 +1384,8 @@ const Writer = struct { } else { try stream.print("@\"{d}\": ", .{i}); } - if (field.field_type != .none) { - try self.writeInstRef(stream, field.field_type); + if (field.type != .none) { + try self.writeInstRef(stream, field.type); } if (field.type_len > 0) { diff --git a/src/translate_c/ast.zig b/src/translate_c/ast.zig index 1ed2eb568c..78175a611b 100644 --- a/src/translate_c/ast.zig +++ b/src/translate_c/ast.zig @@ -392,7 +392,7 @@ pub const Node = extern union { } pub fn Data(comptime t: Tag) type { - return std.meta.fieldInfo(t.Type(), .data).field_type; + return std.meta.fieldInfo(t.Type(), .data).type; } }; @@ -845,7 +845,7 @@ const Context = struct { try c.extra_data.ensureUnusedCapacity(c.gpa, fields.len); const result = @intCast(u32, c.extra_data.items.len); inline for (fields) |field| { - comptime std.debug.assert(field.field_type == NodeIndex); + comptime std.debug.assert(field.type == NodeIndex); c.extra_data.appendAssumeCapacity(@field(extra, field.name)); } return result; diff --git a/src/type.zig b/src/type.zig index 64702509dc..41e287829b 100644 --- a/src/type.zig +++ b/src/type.zig @@ -6216,7 +6216,7 @@ pub const Type = extern union { } pub fn Data(comptime t: Tag) type { - return std.meta.fieldInfo(t.Type(), .data).field_type; + return std.meta.fieldInfo(t.Type(), .data).type; } }; diff --git a/src/value.zig b/src/value.zig index 3d5636ee34..f63bd4916c 100644 --- a/src/value.zig +++ b/src/value.zig @@ -338,7 +338,7 @@ pub const Value = extern union { } pub fn Data(comptime t: Tag) type { - return std.meta.fieldInfo(t.Type(), .data).field_type; + return std.meta.fieldInfo(t.Type(), .data).type; } }; |
