diff --git a/src/Sema.zig b/src/Sema.zig index d58c9dc073..049b289cb8 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -4614,7 +4614,7 @@ fn zirTypeInfo(sema: *Sema, block: *Scope.Block, inst: Zir.Inst.Index) InnerErro } fn zirTypeof(sema: *Sema, block: *Scope.Block, inst: Zir.Inst.Index) InnerError!*Inst { - const inst_data = sema.code.instructions.items(.data)[inst].un_tok; + const inst_data = sema.code.instructions.items(.data)[inst].un_node; const src = inst_data.src(); const operand = try sema.resolveInst(inst_data.operand); return sema.mod.constType(sema.arena, src, operand.ty); diff --git a/src/Zir.zig b/src/Zir.zig index dc2988c2c0..2d69b01fa6 100644 --- a/src/Zir.zig +++ b/src/Zir.zig @@ -523,7 +523,7 @@ pub const Inst = struct { /// Uses `un_node`. negate_wrap, /// Returns the type of a value. - /// Uses the `un_tok` field. + /// Uses the `un_node` field. typeof, /// Given a value which is a pointer, returns the element type. /// Uses the `un_node` field. @@ -1334,7 +1334,7 @@ pub const Inst = struct { .subwrap = .pl_node, .negate = .un_node, .negate_wrap = .un_node, - .typeof = .un_tok, + .typeof = .un_node, .typeof_elem = .un_node, .typeof_log2_int_type = .un_node, .log2_int_type = .un_node,