commit f09313dbc46ae9dc6165cbfb3d0b18760db55752 (tree)
parent 027aabf4977d0362e908d9ef732aaa929605d563
Author: Veikka Tuominen <git@vexu.eu>
Date: Fri, 13 Oct 2023 16:55:56 +0300
Sema: fix `@Vector` source locations being swapped
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Sema.zig b/src/Sema.zig
@@ -8229,8 +8229,8 @@ fn zirVectorElemType(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileEr
fn zirVectorType(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air.Inst.Ref {
const mod = sema.mod;
const inst_data = sema.code.instructions.items(.data)[inst].pl_node;
- const elem_type_src: LazySrcLoc = .{ .node_offset_builtin_call_arg0 = inst_data.src_node };
- const len_src: LazySrcLoc = .{ .node_offset_builtin_call_arg1 = inst_data.src_node };
+ const len_src: LazySrcLoc = .{ .node_offset_builtin_call_arg0 = inst_data.src_node };
+ const elem_type_src: LazySrcLoc = .{ .node_offset_builtin_call_arg1 = inst_data.src_node };
const extra = sema.code.extraData(Zir.Inst.Bin, inst_data.payload_index).data;
const len: u32 = @intCast(try sema.resolveInt(block, len_src, extra.lhs, Type.u32, .{
.needed_comptime_reason = "vector length must be comptime-known",