aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/analyze.cpp')
-rw-r--r--src/analyze.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp
index 0f2fdf15de..590c946f7e 100644
--- a/src/analyze.cpp
+++ b/src/analyze.cpp
@@ -5931,8 +5931,8 @@ size_t type_id_len() {
return array_length(all_type_ids);
}
-size_t type_id_index(TypeTableEntryId id) {
- switch (id) {
+size_t type_id_index(TypeTableEntry *entry) {
+ switch (entry->id) {
case TypeTableEntryIdInvalid:
zig_unreachable();
case TypeTableEntryIdMetaType:
@@ -5952,6 +5952,8 @@ size_t type_id_index(TypeTableEntryId id) {
case TypeTableEntryIdArray:
return 7;
case TypeTableEntryIdStruct:
+ if (entry->data.structure.is_slice)
+ return 25;
return 8;
case TypeTableEntryIdNumLitFloat:
return 9;