authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-11-01 18:19:25-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-11-05 12:11:18-05:00
logece8d6c2fa8ec5e851a00efdc1f407ecfc663f11
treeff0956c60742e716b7463d4e44729169121dd0ca
parent55e54d98c47a0f1fb951f2011c6fc221af68d537
signaturelock-open Commit is signed but in an unrecognized format.

comptime load of vector element


2 files changed, 2 insertions(+), 2 deletions(-)

src/ir.cpp+1-1
......@@ -17744,7 +17744,7 @@ static IrInstruction *ir_analyze_instruction_elem_ptr(IrAnalyze *ira, IrInstruct
1774417744 zig_panic("TODO elem ptr on a slice has a null pointer");
1774517745 }
1774617746 return result;
17747 } else if (array_type->id == ZigTypeIdArray) {
17747 } else if (array_type->id == ZigTypeIdArray || array_type->id == ZigTypeIdVector) {
1774817748 IrInstruction *result;
1774917749 if (orig_array_ptr_val->data.x_ptr.mut == ConstPtrMutInfer) {
1775017750 result = ir_build_elem_ptr(&ira->new_irb, elem_ptr_instruction->base.scope,
test/stage1/behavior/vector.zig+1-1
......@@ -174,5 +174,5 @@ test "load vector elements via comptime index" {
174174 };
175175
176176 S.doTheTest();
177 //comptime S.doTheTest();
177 comptime S.doTheTest();
178178}