| ... | ... | @@ -17280,7 +17280,11 @@ static IrInstruction *ir_analyze_instruction_elem_ptr(IrAnalyze *ira, IrInstruct |
| 17280 | 17280 | ZigType *actual_array_type = ir_resolve_type(ira, elem_ptr_instruction->init_array_type->child); |
| 17281 | 17281 | if (type_is_invalid(actual_array_type)) |
| 17282 | 17282 | return ira->codegen->invalid_instruction; |
| 17283 | | assert(actual_array_type->id == ZigTypeIdArray); |
| 17283 | if (actual_array_type->id != ZigTypeIdArray) { |
| 17284 | ir_add_error(ira, elem_ptr_instruction->init_array_type, |
| 17285 | buf_sprintf("expected array type or [_], found slice")); |
| 17286 | return ira->codegen->invalid_instruction; |
| 17287 | } |
| 17284 | 17288 | |
| 17285 | 17289 | ConstExprValue *array_init_val = create_const_vals(1); |
| 17286 | 17290 | array_init_val->special = ConstValSpecialStatic; |
| ... | ... | @@ -19575,7 +19579,7 @@ static IrInstruction *ir_analyze_instruction_container_init_list(IrAnalyze *ira, |
| 19575 | 19579 | size_t elem_count = instruction->item_count; |
| 19576 | 19580 | |
| 19577 | 19581 | if (is_slice(container_type)) { |
| 19578 | | ir_add_error(ira, &instruction->base, |
| 19582 | ir_add_error(ira, instruction->container_type, |
| 19579 | 19583 | buf_sprintf("expected array type or [_], found slice")); |
| 19580 | 19584 | return ira->codegen->invalid_instruction; |
| 19581 | 19585 | } |