aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-11-05 12:36:39 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-11-05 12:36:39 -0500
commit9b4a52916472f39a0a9e6d0807240e304a9e9ca6 (patch)
tree2bf61887435fff1328211eec5072ed67bb924ece /src/ir.cpp
parentcbaa10fc3bcd2d5f8d48b9038e840ae508fe2822 (diff)
downloadzig-9b4a52916472f39a0a9e6d0807240e304a9e9ca6.tar.gz
zig-9b4a52916472f39a0a9e6d0807240e304a9e9ca6.zip
fix initialization of vector in a struct field
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 0c75fe7c19..d4687e5adb 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -17640,7 +17640,7 @@ static IrInstruction *ir_analyze_instruction_elem_ptr(IrAnalyze *ira, IrInstruct
return ira->codegen->invalid_instruction;
if (array_ptr_val->special == ConstValSpecialUndef && elem_ptr_instruction->init_array_type != nullptr) {
- if (array_type->id == ZigTypeIdArray) {
+ if (array_type->id == ZigTypeIdArray || array_type->id == ZigTypeIdVector) {
array_ptr_val->data.x_array.special = ConstArraySpecialNone;
array_ptr_val->data.x_array.data.s_none.elements = create_const_vals(array_type->data.array.len);
array_ptr_val->special = ConstValSpecialStatic;