| ... | @@ -6369,10 +6369,7 @@ static ImplicitCastMatchResult ir_types_match_with_implicit_cast(IrAnalyze *ira, | ... | @@ -6369,10 +6369,7 @@ static ImplicitCastMatchResult ir_types_match_with_implicit_cast(IrAnalyze *ira, |
| 6369 | } | 6369 | } |
| 6370 | | 6370 | |
| 6371 | // implicit [N]T to []const T | 6371 | // implicit [N]T to []const T |
| 6372 | if (expected_type->id == TypeTableEntryIdStruct && | 6372 | if (is_slice(expected_type) && actual_type->id == TypeTableEntryIdArray) { |
| 6373 | expected_type->data.structure.is_slice && | | |
| 6374 | actual_type->id == TypeTableEntryIdArray) | | |
| 6375 | { | | |
| 6376 | TypeTableEntry *ptr_type = expected_type->data.structure.fields[slice_ptr_index].type_entry; | 6373 | TypeTableEntry *ptr_type = expected_type->data.structure.fields[slice_ptr_index].type_entry; |
| 6377 | assert(ptr_type->id == TypeTableEntryIdPointer); | 6374 | assert(ptr_type->id == TypeTableEntryIdPointer); |
| 6378 | | 6375 | |
| ... | @@ -6384,8 +6381,7 @@ static ImplicitCastMatchResult ir_types_match_with_implicit_cast(IrAnalyze *ira, | ... | @@ -6384,8 +6381,7 @@ static ImplicitCastMatchResult ir_types_match_with_implicit_cast(IrAnalyze *ira, |
| 6384 | } | 6381 | } |
| 6385 | | 6382 | |
| 6386 | // implicit &const [N]T to []const T | 6383 | // implicit &const [N]T to []const T |
| 6387 | if (expected_type->id == TypeTableEntryIdStruct && | 6384 | if (is_slice(expected_type) && |
| 6388 | expected_type->data.structure.is_slice && | | |
| 6389 | actual_type->id == TypeTableEntryIdPointer && | 6385 | actual_type->id == TypeTableEntryIdPointer && |
| 6390 | actual_type->data.pointer.is_const && | 6386 | actual_type->data.pointer.is_const && |
| 6391 | actual_type->data.pointer.child_type->id == TypeTableEntryIdArray) | 6387 | actual_type->data.pointer.child_type->id == TypeTableEntryIdArray) |