diff --git a/src/ir.cpp b/src/ir.cpp index f47d5cf07297c5ded607e2c80242d872f71ba7b1..f0f6c0ea7ef2b05800597b56f15089bf177ba2b1 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -17744,7 +17744,7 @@ static IrInstruction *ir_analyze_instruction_elem_ptr(IrAnalyze *ira, IrInstruct zig_panic("TODO elem ptr on a slice has a null pointer"); } return result; - } else if (array_type->id == ZigTypeIdArray) { + } else if (array_type->id == ZigTypeIdArray || array_type->id == ZigTypeIdVector) { IrInstruction *result; if (orig_array_ptr_val->data.x_ptr.mut == ConstPtrMutInfer) { result = ir_build_elem_ptr(&ira->new_irb, elem_ptr_instruction->base.scope, diff --git a/test/stage1/behavior/vector.zig b/test/stage1/behavior/vector.zig index 3caa855bfd87d5dc8d09cdddfabdcc11c561edb8..21c5670be388e423641701daaf5fb21506113963 100644 --- a/test/stage1/behavior/vector.zig +++ b/test/stage1/behavior/vector.zig @@ -174,5 +174,5 @@ test "load vector elements via comptime index" { }; S.doTheTest(); - //comptime S.doTheTest(); + comptime S.doTheTest(); }