Fix String causes a crash when used in a polymorphic type #483

This commit is contained in:
gingerBill
2019-11-20 22:07:12 +00:00
parent 69afa33fa5
commit e01d8a04a9
2 changed files with 19 additions and 3 deletions

View File

@@ -1088,7 +1088,9 @@ Type *core_array_type(Type *t) {
for (;;) {
Type *prev = t;
t = base_array_type(t);
if (prev == t) break;
if (t->kind != Type_Array && t->kind != Type_SimdVector) {
break;
}
}
return t;
}